Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,7 @@ model_name = "deepset/roberta-base-squad2"
|
|
6 |
my_pipeline = pipeline('question-answering', model=model_name, tokenizer=model_name)
|
7 |
|
8 |
def answer_question(question, context):
|
9 |
-
text =
|
10 |
-
|
11 |
-
response = my_pipeline(di)
|
12 |
return response
|
13 |
grad.Interface(answer_question, inputs=["text","text"], outputs="text").launch()
|
|
|
6 |
my_pipeline = pipeline('question-answering', model=model_name, tokenizer=model_name)
|
7 |
|
8 |
def answer_question(question, context):
|
9 |
+
text = {'question':question, 'context': context}"
|
10 |
+
response = my_pipeline(text)
|
|
|
11 |
return response
|
12 |
grad.Interface(answer_question, inputs=["text","text"], outputs="text").launch()
|