Spaces:
Build error
Build error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -58,11 +58,6 @@ def select_version_df(name):
|
|
| 58 |
return versions_data['dataframes'][i]
|
| 59 |
|
| 60 |
|
| 61 |
-
def _initial_trend_plot():
|
| 62 |
-
# You can choose default values (matching what you want to show first)
|
| 63 |
-
return get_final_trend_plot("Text", mobile_view=False)
|
| 64 |
-
|
| 65 |
-
|
| 66 |
"""
|
| 67 |
MAIN APPLICATION
|
| 68 |
"""
|
|
@@ -376,8 +371,7 @@ with hf_app:
|
|
| 376 |
)
|
| 377 |
|
| 378 |
with gr.Row():
|
| 379 |
-
trend_plot = gr.Plot(get_final_trend_plot("Text", mobile_view=False)
|
| 380 |
-
elem_id="trend-plot-1")
|
| 381 |
|
| 382 |
trend_select.change(
|
| 383 |
get_final_trend_plot,
|
|
@@ -446,9 +440,7 @@ with hf_app:
|
|
| 446 |
dummy_prev_table,
|
| 447 |
queue=True
|
| 448 |
)
|
| 449 |
-
|
| 450 |
-
# Load the trend plot initially, to auto-adjust the width according to HF container
|
| 451 |
-
hf_app.load(_initial_trend_plot, None, trend_plot)
|
| 452 |
hf_app.queue()
|
| 453 |
|
| 454 |
# Add scheduler to auto-restart the HF space at every TIME interval and update every component each time
|
|
|
|
| 58 |
return versions_data['dataframes'][i]
|
| 59 |
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
"""
|
| 62 |
MAIN APPLICATION
|
| 63 |
"""
|
|
|
|
| 371 |
)
|
| 372 |
|
| 373 |
with gr.Row():
|
| 374 |
+
trend_plot = gr.Plot(get_final_trend_plot("Text", mobile_view=False, custom_width=1200))
|
|
|
|
| 375 |
|
| 376 |
trend_select.change(
|
| 377 |
get_final_trend_plot,
|
|
|
|
| 440 |
dummy_prev_table,
|
| 441 |
queue=True
|
| 442 |
)
|
| 443 |
+
hf_app.load()
|
|
|
|
|
|
|
| 444 |
hf_app.queue()
|
| 445 |
|
| 446 |
# Add scheduler to auto-restart the HF space at every TIME interval and update every component each time
|