Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,13 @@
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
4 |
-
# Replace this with your own checkpoint
|
5 |
-
model_checkpoint = "huggingface-course/bert-finetuned-squad"
|
6 |
-
model = pipeline("question-answering", model=model_checkpoint)
|
7 |
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
10 |
{
|
11 |
"context": context,
|
12 |
"qas": [
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import pipeline
|
3 |
|
|
|
|
|
|
|
4 |
|
5 |
+
|
6 |
+
def question_answer(context, question):
|
7 |
+
# Replace this with your own checkpoint
|
8 |
+
model_checkpoint = "huggingface-course/bert-finetuned-squad"
|
9 |
+
model = pipeline("question-answering", model=model_checkpoint)
|
10 |
+
to_predict = [
|
11 |
{
|
12 |
"context": context,
|
13 |
"qas": [
|