Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
context = "blah blah blah"
|
4 |
+
|
5 |
+
question = "How many blahs?"
|
6 |
+
|
7 |
+
gr.Interface.load(
|
8 |
+
"huggingface/deepset/roberta-base-squad2",
|
9 |
+
theme="default",
|
10 |
+
css=".footer{display:none !important}",
|
11 |
+
inputs=[gr.inputs.Textbox(lines=40, default=context, label="Context paragraph"), gr.inputs.Textbox(lines=10, default=question, label="Question")],
|
12 |
+
outputs=[gr.outputs.Textbox(label="Answer"), gr.outputs.Textbox(label="Score")],
|
13 |
+
title=None,
|
14 |
+
description="Provide your own paragraph and ask any question about the text. How well does the model answer?").launch()
|