shripadbhat's picture
QA pipeline
03c65d9
raw
history blame
353 Bytes
import gradio as gr
from transformers import pipeline
qa_model = pipeline("question-answering",'a-ware/bart-squadv2')
def fetch_answer(name):
return qa_model(question = question, context = context)['answer']
demo = gr.Interface(
fn=fetch_answer,
inputs=gr.Textbox(lines=2, placeholder="Name Here..."),
outputs="text",
)
demo.launch()