Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from transformers import pipeline | |
| title = 'Question Answering' | |
| context = "Professor Geoffrey Hinton told BBC Newsnight that a benefits reform giving fixed amounts of cash to every citizen would be needed because he was “very worried about AI taking lots of mundane jobs”." | |
| question = "Why Geoffrey Hinton is worried about AI on human jobs?" | |
| question_answerer = pipeline("question-answering", model='Hemg/Question-answering') | |
| interface = gr.Interface.from_pipeline(question_answerer, | |
| title = title, | |
| theme = "peach", | |
| examples = [[context, question]]).launch() | |