Gowtham122 commited on
Commit
521c52d
·
verified ·
1 Parent(s): fdfb527

Update app/models.py

Browse files
Files changed (1) hide show
  1. 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() # This will automatically call `_load_model` during initialization
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):