subhannadeem1's picture
Create app.py
0330a7b
raw
history blame contribute delete
498 Bytes
import gradio as gr
from transformers import pipeline
title = 'Question Answering APP'
context = "My name is Subhan Chaudhry. I love play Cricket and Eat Vello it regularly"
question = "What do I love?"
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()