jayebaku commited on
Commit
4ddc454
·
verified ·
1 Parent(s): f31c7d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -214,14 +214,15 @@ with gr.Blocks(fill_width=True) as demo:
214
  """)
215
  with gr.Row():
216
  with gr.Column(scale=4):
217
- T_file_input = gr.File(label="Upload CSV or TSV File", file_types=['.tsv', '.csv'])
218
- T_text_field = gr.Textbox(label="Text field name", value="tweet_text")
219
- T_event_model = gr.Dropdown(event_models, value=event_models[0], label="Select classification model")
220
- with gr.Accordion("Prediction threshold", open=False):
221
- T_threshold = gr.Slider(0, 1, value=0, step=0.01, label="Prediction threshold", show_label=False,
222
- info="This value sets a threshold by which texts classified flood or fire are accepted, \
223
- higher values makes the classifier stricter (CAUTION: A value of 1 will set all predictions as none)", interactive=True)
224
- T_predict_button = gr.Button("Start Prediction")
 
225
 
226
  T_data_filter = gr.Dropdown(visible=False)
227
  T_tweet_embed = gr.HTML("<h1>Select a Tweet ID to view Tweet</h1>", container=True, every=1.0)
 
214
  """)
215
  with gr.Row():
216
  with gr.Column(scale=4):
217
+ with gr.Group():
218
+ T_file_input = gr.File(label="Upload CSV or TSV File", file_types=['.tsv', '.csv'])
219
+ T_text_field = gr.Textbox(label="Text field name", value="tweet_text")
220
+ T_event_model = gr.Dropdown(event_models, value=event_models[0], label="Select classification model")
221
+ with gr.Accordion("Prediction threshold", open=False):
222
+ T_threshold = gr.Slider(0, 1, value=0, step=0.01, label="Prediction threshold", show_label=False,
223
+ info="This value sets a threshold by which texts classified flood or fire are accepted, \
224
+ higher values makes the classifier stricter (CAUTION: A value of 1 will set all predictions as none)", interactive=True)
225
+ T_predict_button = gr.Button("Start Prediction")
226
 
227
  T_data_filter = gr.Dropdown(visible=False)
228
  T_tweet_embed = gr.HTML("<h1>Select a Tweet ID to view Tweet</h1>", container=True, every=1.0)