Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,9 +5,10 @@ from transformers import AutoModelForQuestionAnswering
|
|
| 5 |
from transformers import pipeline
|
| 6 |
from transformers import AutoTokenizer
|
| 7 |
|
|
|
|
|
|
|
|
|
|
| 8 |
def question_answer(question, context):
|
| 9 |
-
# Initializing the pipeline for the question answering model
|
| 10 |
-
question_answerer = pipeline("question-answering", model="Only-Mike/ADHD_Test_qa_model")
|
| 11 |
# Answering from the trained model
|
| 12 |
result = question_answerer(question=question, context=context)
|
| 13 |
return result["answer"]
|
|
|
|
| 5 |
from transformers import pipeline
|
| 6 |
from transformers import AutoTokenizer
|
| 7 |
|
| 8 |
+
# Initializing the pipeline for the question answering model
|
| 9 |
+
question_answerer = pipeline("question-answering", model="Only-Mike/ADHD_Test_qa_model")
|
| 10 |
+
|
| 11 |
def question_answer(question, context):
|
|
|
|
|
|
|
| 12 |
# Answering from the trained model
|
| 13 |
result = question_answerer(question=question, context=context)
|
| 14 |
return result["answer"]
|