Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
|
5 |
-
model = "google-bert/bert-large-uncased-whole-word-masking-finetuned-squad"
|
6 |
-
qa_pipeline = pipeline("question-answering", model=model, tokenizer=model)
|
7 |
-
|
8 |
# Define the function to answer questions
|
9 |
def get_answer(text):
|
10 |
result = qa_pipeline({
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
+
pipe = pipeline("question-answering", model="google-bert/bert-large-uncased-whole-word-masking-finetuned-squad")
|
|
|
|
|
|
|
5 |
# Define the function to answer questions
|
6 |
def get_answer(text):
|
7 |
result = qa_pipeline({
|