|
import gradio as gr |
|
|
|
context = "blah blah blah" |
|
|
|
question = "How many blahs?" |
|
|
|
gr.Interface.load( |
|
"huggingface/deepset/roberta-base-squad2", |
|
theme="default", |
|
css=".footer{display:none !important}", |
|
inputs=[gr.inputs.Textbox(lines=40, default=context, label="Context paragraph"), gr.inputs.Textbox(lines=10, default=question, label="Question")], |
|
outputs=[gr.outputs.Textbox(label="Answer"), gr.outputs.Textbox(label="Score")], |
|
title=None, |
|
description="Provide your own paragraph and ask any question about the text. How well does the model answer?").launch() |