Spaces:
Running
Running
Update run.py
Browse files
run.py
CHANGED
@@ -11,7 +11,8 @@ question = "Which continent is the Amazon rainforest in?"
|
|
11 |
|
12 |
|
13 |
def predict(context, question):
|
14 |
-
|
|
|
15 |
|
16 |
gr.Interface(predict, inputs=[
|
17 |
gr.inputs.Textbox(lines=7, default=context, label="Context Paragraph"),
|
|
|
11 |
|
12 |
|
13 |
def predict(context, question):
|
14 |
+
res = nlp({"question": question, "context": context})
|
15 |
+
return res["answer"], res["score"]
|
16 |
|
17 |
gr.Interface(predict, inputs=[
|
18 |
gr.inputs.Textbox(lines=7, default=context, label="Context Paragraph"),
|