Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -63,31 +63,29 @@ def answer_questions(context, question):
|
|
63 |
# App Interface
|
64 |
with gr.Blocks() as app:
|
65 |
gr.Markdown("<center> <h1>Question Answering with Short and Long Answer Models </h1> </center><hr>")
|
66 |
-
with gr.
|
67 |
-
with gr.
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
with gr.
|
74 |
-
with gr.
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
with gr.
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
with gr.
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
long_score_output = gr.Number(label="RoBERTa Base Score")
|
89 |
|
90 |
-
with gr.Tab("Predict Long Answer"):
|
91 |
|
92 |
submit_btn.click(fn=answer_questions, inputs=[context_input, question_input], outputs=[short_answer_output, short_score_output, long_answer_output, long_score_output])
|
93 |
examples='examples'
|
|
|
63 |
# App Interface
|
64 |
with gr.Blocks() as app:
|
65 |
gr.Markdown("<center> <h1>Question Answering with Short and Long Answer Models </h1> </center><hr>")
|
66 |
+
with gr.Row():
|
67 |
+
with gr.Column():
|
68 |
+
context_input = gr.Textbox(lines=7, label="Context", placeholder="Input Context here...")
|
69 |
+
question_input = gr.Textbox(label="Question", placeholder="Input Question here...")
|
70 |
+
submit_btn = gr.Button("Submit")
|
71 |
+
gr.ClearButton([context_input,question_input])
|
72 |
+
with gr.Column():
|
73 |
+
with gr.Row():
|
74 |
+
with gr.Column(scale=6):
|
75 |
+
short_answer_output = gr.Textbox(lines=3, label="Distil BERT Base Uncased")
|
76 |
+
with gr.Column(scale=2):
|
77 |
+
short_score_output = gr.Number(label="Distil BERT Base Uncased Score")
|
78 |
+
with gr.Row():
|
79 |
+
with gr.Column(scale=6):
|
80 |
+
long_answer_output = gr.Textbox(lines=3, label="BERT Base Uncased")
|
81 |
+
with gr.Column(scale=2):
|
82 |
+
long_score_output = gr.Number(label="BERT Base Uncased Score")
|
83 |
+
with gr.Row():
|
84 |
+
with gr.Column(scale=6):
|
85 |
+
long_answer_output = gr.Textbox(lines=3, label="RoBERTa Base")
|
86 |
+
with gr.Column(scale=2):
|
87 |
+
long_score_output = gr.Number(label="RoBERTa Base Score")
|
|
|
88 |
|
|
|
89 |
|
90 |
submit_btn.click(fn=answer_questions, inputs=[context_input, question_input], outputs=[short_answer_output, short_score_output, long_answer_output, long_score_output])
|
91 |
examples='examples'
|