Spaces:
Sleeping
Sleeping
Commit
·
db6b88a
1
Parent(s):
9c811dd
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ mdl_name = "deepset/roberta-base-squad2"
|
|
6 |
my_pipeline = pipeline('question-answering', model=mdl_name, tokenizer=mdl_name)
|
7 |
|
8 |
def answer_question(question,context):
|
9 |
-
text =
|
10 |
di=ast.literal_eval(text)
|
11 |
response = my_pipeline(di)
|
12 |
return response
|
|
|
6 |
my_pipeline = pipeline('question-answering', model=mdl_name, tokenizer=mdl_name)
|
7 |
|
8 |
def answer_question(question,context):
|
9 |
+
text = '''{'question': {}, 'context': {} }'''.format(question, context)
|
10 |
di=ast.literal_eval(text)
|
11 |
response = my_pipeline(di)
|
12 |
return response
|