Spaces:
Runtime error
Runtime error
added app.py with pretrained model
Browse files
app.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
import gradio as gr
|
3 |
+
context = "This procedure is used to guide technician to replace equipment EQ1. The procedure is valid in normal operation. There is different procedure for emergency situations. The replacement of EQ1 may be done by SE, MT, or MS."
|
4 |
+
question = "Who can replace the equipment?"
|
5 |
+
gr.Interface.load(
|
6 |
+
"huggingface/deepset/roberta-base-squad2",
|
7 |
+
theme="default",
|
8 |
+
inputs=[gr.inputs.Textbox(lines=7, default=context, label="Context Paragraph"), gr.inputs.Textbox(lines=2, default=question, label="Question")],
|
9 |
+
outputs=[gr.outputs.Textbox(label="Answer"), gr.outputs.Textbox(label="Score")],
|
10 |
+
title=None).launch()
|