Nighter commited on
Commit
95d2c7f
1 Parent(s): 5cadf77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -24
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.Tab("QA Short Answer"):
67
- with gr.Row():
68
- with gr.Column():
69
- context_input = gr.Textbox(lines=7, label="Context", placeholder="Input Context here...")
70
- question_input = gr.Textbox(label="Question", placeholder="Input Question here...")
71
- submit_btn = gr.Button("Submit")
72
- gr.ClearButton([context_input,question_input])
73
- with gr.Column():
74
- with gr.Row():
75
- with gr.Column(scale=6):
76
- short_answer_output = gr.Textbox(lines=3, label="Distil BERT Base Uncased")
77
- with gr.Column(scale=2):
78
- short_score_output = gr.Number(label="Distil BERT Base Uncased Score")
79
- with gr.Row():
80
- with gr.Column(scale=6):
81
- long_answer_output = gr.Textbox(lines=3, label="BERT Base Uncased")
82
- with gr.Column(scale=2):
83
- long_score_output = gr.Number(label="BERT Base Uncased Score")
84
- with gr.Row():
85
- with gr.Column(scale=6):
86
- long_answer_output = gr.Textbox(lines=3, label="RoBERTa Base")
87
- with gr.Column(scale=2):
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'