Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
|
2 |
-
import gradio
|
3 |
import ast
|
4 |
-
|
|
|
5 |
my_pipeline = pipeline('question-answering', model=mdl_name, tokenizer=mdl_name)
|
6 |
|
|
|
7 |
def answer_question(question,context):
|
8 |
text= "{"+"'question': '"+question+"','context': '"+context+"'}"
|
9 |
|
|
|
1 |
from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
|
2 |
+
import gradio
|
3 |
import ast
|
4 |
+
|
5 |
+
mdl_name = "distilbert-base-cased-distilled-squad"
|
6 |
my_pipeline = pipeline('question-answering', model=mdl_name, tokenizer=mdl_name)
|
7 |
|
8 |
+
|
9 |
def answer_question(question,context):
|
10 |
text= "{"+"'question': '"+question+"','context': '"+context+"'}"
|
11 |
|