Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ _model = AutoModelForQuestionAnswering.from_pretrained(_pretrainedModelName)
|
|
| 9 |
_pipeline = pipeline("question-answering", model = _model, tokenizer = _tokenizer)
|
| 10 |
|
| 11 |
|
| 12 |
-
def answer_question(question,
|
| 13 |
text = "{" + "'question': '"+question+"', 'context':'"+context+"'}"
|
| 14 |
di = ast.literal_eval(text)
|
| 15 |
response = _pipeline(di)
|
|
|
|
| 9 |
_pipeline = pipeline("question-answering", model = _model, tokenizer = _tokenizer)
|
| 10 |
|
| 11 |
|
| 12 |
+
def answer_question(question, context):
|
| 13 |
text = "{" + "'question': '"+question+"', 'context':'"+context+"'}"
|
| 14 |
di = ast.literal_eval(text)
|
| 15 |
response = _pipeline(di)
|