Spaces:
Sleeping
Sleeping
shambhuDATA
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import ast
|
|
4 |
model_name="deepset/roberta-base-squad2"
|
5 |
pipe=pipeline('question-answering',model=model_name,tokenizer=model_name)
|
6 |
def answer_question(question,context):
|
7 |
-
text="{"+"'question': '"+question + "','
|
8 |
di= ast.literal_eval(text)
|
9 |
response= pipe(di)
|
10 |
return response
|
|
|
4 |
model_name="deepset/roberta-base-squad2"
|
5 |
pipe=pipeline('question-answering',model=model_name,tokenizer=model_name)
|
6 |
def answer_question(question,context):
|
7 |
+
text="{"+"'question': '"+question + "','context':'"+context+"'}"
|
8 |
di= ast.literal_eval(text)
|
9 |
response= pipe(di)
|
10 |
return response
|