Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -68,7 +68,7 @@ def load_and_classify_csv(file, text_field, event_model, threshold):
|
|
68 |
|
69 |
return flood_related, fire_related, not_related, model_confidence, len(df[text_field].to_list()), df, gr.update(interactive=True), gr.update(interactive=True)
|
70 |
|
71 |
-
def load_and_classify_csv_dataframe(file, text_field, event_model, threshold):
|
72 |
|
73 |
filepath = file.name
|
74 |
if ".csv" in filepath:
|
@@ -378,7 +378,10 @@ with gr.Blocks(fill_width=True) as demo:
|
|
378 |
outputs=[T_data, T_data_ss_state, T_data_filter]
|
379 |
)
|
380 |
|
381 |
-
T_data.select(T_on_select, None, T_tweet_embed).then(fn=None, js="reloadTwitterWidgets()")
|
|
|
|
|
|
|
382 |
|
383 |
@T_data_filter.input(inputs=[T_data_ss_state, T_data_filter], outputs=T_data)
|
384 |
def filter_df(df, filter):
|
|
|
68 |
|
69 |
return flood_related, fire_related, not_related, model_confidence, len(df[text_field].to_list()), df, gr.update(interactive=True), gr.update(interactive=True)
|
70 |
|
71 |
+
def load_and_classify_csv_dataframe(file, text_field, event_model, threshold):
|
72 |
|
73 |
filepath = file.name
|
74 |
if ".csv" in filepath:
|
|
|
378 |
outputs=[T_data, T_data_ss_state, T_data_filter]
|
379 |
)
|
380 |
|
381 |
+
# T_data.select(T_on_select, None, T_tweet_embed).then(fn=None, js="reloadTwitterWidgets()")
|
382 |
+
T_data.select(
|
383 |
+
fn=lambda: gr.update(value=""),
|
384 |
+
outputs=T_tweet_embed).then(T_on_select, None, T_tweet_embed).then(fn=None, js="reloadTwitterWidgets()")
|
385 |
|
386 |
@T_data_filter.input(inputs=[T_data_ss_state, T_data_filter], outputs=T_data)
|
387 |
def filter_df(df, filter):
|