markupQAdemo / app.py
FuriouslyAsleep's picture
Update app.py
14c2644
raw
history blame
509 Bytes
import gradio as gr
from transformers import pipeline
title = 'Question Answering APP'
context = "There are three bridges in the county. Two of them are covered."
question = "How many uncovered bridges are there?"
question_answerer = pipeline("question-answering")
#result = question_answerer(question = question, context=context)
#return result['answer']
interface = gr.Interface.from_pipeline(question_answerer,
title = title,
theme = "grass",
examples = [[context, question]]).launch()