Spaces:
Paused
Paused
Update app/models.py
Browse files- app/models.py +2 -2
app/models.py
CHANGED
@@ -108,12 +108,12 @@ class QAModel:
|
|
108 |
# Global instance of the QA model
|
109 |
qa_model = QAModel()
|
110 |
|
111 |
-
def load_qa_pipeline():
|
112 |
"""
|
113 |
Load the QA model and tokenizer.
|
114 |
"""
|
115 |
global qa_model
|
116 |
-
qa_model = QAModel()
|
117 |
return qa_model
|
118 |
|
119 |
def inference_qa(qa_pipeline, context: str, question: str):
|
|
|
108 |
# Global instance of the QA model
|
109 |
qa_model = QAModel()
|
110 |
|
111 |
+
def load_qa_pipeline(model_name: str = "Gowtham122/albertqa"):
|
112 |
"""
|
113 |
Load the QA model and tokenizer.
|
114 |
"""
|
115 |
global qa_model
|
116 |
+
qa_model = QAModel(model_name)
|
117 |
return qa_model
|
118 |
|
119 |
def inference_qa(qa_pipeline, context: str, question: str):
|