Spaces:
Sleeping
Sleeping
Walid-Ahmed
commited on
Commit
•
24be6a2
1
Parent(s):
d399ffa
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import chardet
|
|
4 |
|
5 |
# Initialize the question-answering pipeline
|
6 |
#qa_pipeline = pipeline("question-answering",model="deepset/roberta-base-squad2")
|
7 |
-
|
8 |
def answer_question(context, question):
|
9 |
result = qa_pipeline(question=question, context=context)
|
10 |
return result['answer']
|
|
|
4 |
|
5 |
# Initialize the question-answering pipeline
|
6 |
#qa_pipeline = pipeline("question-answering",model="deepset/roberta-base-squad2")
|
7 |
+
qa_pipeline = pipeline("question-answering",model="distilbert-base-cased-distilled-squad")
|
8 |
def answer_question(context, question):
|
9 |
result = qa_pipeline(question=question, context=context)
|
10 |
return result['answer']
|