shripadbhat's picture
Update app.py
7310c03
raw
history blame
454 Bytes
import gradio as gr
from transformers import pipeline
qa_model = pipeline("question-answering",'a-ware/bart-squadv2')
def fetch_answer(question, context ):
return qa_model(question = question, context = context)['answer']
demo = gr.Interface(
fn=fetch_answer,
inputs=[gr.Textbox(lines=2, placeholder="What is age of patient..."),gr.Textbox(lines=2, placeholder="The patient is a 71 year old male...")],
outputs="text",
)
demo.launch()