CoolFace
Apppublic

Sakil/question_answering_app

sourceHugging Faceapache-2.0updated 5y agoView on Hugging Face
1likes
app.py18 linesDownload Raw Back to root
1import gradio as gr2from transformers import pipeline3title = 'Question Answering APP'4context = "My name is Sakil Ansari. I love tea and drink it regularly"5question = "What do I love?"6 7 8question_answerer = pipeline("question-answering")9 #result  = question_answerer(question = question, context=context)10 #return result['answer']11 12 13 14 15interface = gr.Interface.from_pipeline(question_answerer,16    title = title,17    theme = "grass",18    examples = [[context, question]]).launch()