question_answer / app.py
Wootang01's picture
Update app.py
ce506b5
raw
history blame
651 Bytes
import gradio as gr
examples = [
["It's rainy today but it will stop in a few hours", "What is the weather like in a few hours?"]
]
gr.Interface.load("huggingface/deepset/roberta-base-squad2",
inputs=[gr.inputs.Textbox(lines=10, label="Context", placeholder="Type a sentence or paragraph here."),
gr.inputs.Textbox(lines=2, label="Question", placeholder="Ask a question based on the context.")],
outputs=[gr.outputs.Textbox(label="Answer"),
gr.outputs.Label(label="Probability")],
examples=examples).launch(share=True)