Spaces:
Runtime error
Runtime error
Commit
·
7310c03
1
Parent(s):
03c65d9
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,12 +3,12 @@ from transformers import pipeline
|
|
| 3 |
|
| 4 |
qa_model = pipeline("question-answering",'a-ware/bart-squadv2')
|
| 5 |
|
| 6 |
-
def fetch_answer(
|
| 7 |
return qa_model(question = question, context = context)['answer']
|
| 8 |
|
| 9 |
demo = gr.Interface(
|
| 10 |
fn=fetch_answer,
|
| 11 |
-
inputs=gr.Textbox(lines=2, placeholder="
|
| 12 |
outputs="text",
|
| 13 |
)
|
| 14 |
demo.launch()
|
|
|
|
| 3 |
|
| 4 |
qa_model = pipeline("question-answering",'a-ware/bart-squadv2')
|
| 5 |
|
| 6 |
+
def fetch_answer(question, context ):
|
| 7 |
return qa_model(question = question, context = context)['answer']
|
| 8 |
|
| 9 |
demo = gr.Interface(
|
| 10 |
fn=fetch_answer,
|
| 11 |
+
inputs=[gr.Textbox(lines=2, placeholder="What is age of patient..."),gr.Textbox(lines=2, placeholder="The patient is a 71 year old male...")],
|
| 12 |
outputs="text",
|
| 13 |
)
|
| 14 |
demo.launch()
|