Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,8 @@ from transformers import pipeline
|
|
4 |
|
5 |
# Load your model from the Hugging Face model hub
|
6 |
model_name = "sujra/insurance_Model"
|
7 |
-
qa_pipeline = pipeline("question-answering", model=model_name, tokenizer=model_name)
|
|
|
8 |
|
9 |
def get_answer(question):
|
10 |
answer = qa_pipeline(question=question, max_length=128, batch_size=4)['answer'] # Reduce batch size and set max_length
|
|
|
4 |
|
5 |
# Load your model from the Hugging Face model hub
|
6 |
model_name = "sujra/insurance_Model"
|
7 |
+
qa_pipeline = pipeline("question-answering", model=model_name, tokenizer=model_name, timeout=120)
|
8 |
+
|
9 |
|
10 |
def get_answer(question):
|
11 |
answer = qa_pipeline(question=question, max_length=128, batch_size=4)['answer'] # Reduce batch size and set max_length
|