Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3004,7 +3004,7 @@ def create_interface():
|
|
| 3004 |
""")
|
| 3005 |
|
| 3006 |
with gr.Row():
|
| 3007 |
-
genesis_animation = gr.
|
| 3008 |
|
| 3009 |
with gr.Row():
|
| 3010 |
genesis_summary = gr.Textbox(label="📋 Monthly Genesis Analysis Summary", lines=25)
|
|
@@ -3016,17 +3016,19 @@ def create_interface():
|
|
| 3016 |
|
| 3017 |
# Create animation
|
| 3018 |
genesis_fig = create_genesis_animation(prediction_data, animation)
|
| 3019 |
-
|
| 3020 |
# Generate summary
|
| 3021 |
summary_text = create_prediction_summary(prediction_data)
|
| 3022 |
-
|
| 3023 |
-
|
|
|
|
| 3024 |
|
| 3025 |
except Exception as e:
|
| 3026 |
import traceback
|
| 3027 |
error_msg = f"Genesis prediction failed: {str(e)}\n\nDetails:\n{traceback.format_exc()}"
|
| 3028 |
logging.error(error_msg)
|
| 3029 |
-
|
|
|
|
| 3030 |
|
| 3031 |
generate_genesis_btn.click(
|
| 3032 |
fn=run_genesis_prediction,
|
|
|
|
| 3004 |
""")
|
| 3005 |
|
| 3006 |
with gr.Row():
|
| 3007 |
+
genesis_animation = gr.HTML(label="🗺️ Daily Genesis Potential & Storm Development")
|
| 3008 |
|
| 3009 |
with gr.Row():
|
| 3010 |
genesis_summary = gr.Textbox(label="📋 Monthly Genesis Analysis Summary", lines=25)
|
|
|
|
| 3016 |
|
| 3017 |
# Create animation
|
| 3018 |
genesis_fig = create_genesis_animation(prediction_data, animation)
|
| 3019 |
+
|
| 3020 |
# Generate summary
|
| 3021 |
summary_text = create_prediction_summary(prediction_data)
|
| 3022 |
+
|
| 3023 |
+
html = genesis_fig.to_html(include_plotlyjs='cdn', full_html=False)
|
| 3024 |
+
return html, summary_text
|
| 3025 |
|
| 3026 |
except Exception as e:
|
| 3027 |
import traceback
|
| 3028 |
error_msg = f"Genesis prediction failed: {str(e)}\n\nDetails:\n{traceback.format_exc()}"
|
| 3029 |
logging.error(error_msg)
|
| 3030 |
+
err_fig = create_error_plot(error_msg)
|
| 3031 |
+
return err_fig.to_html(include_plotlyjs='cdn', full_html=False), error_msg
|
| 3032 |
|
| 3033 |
generate_genesis_btn.click(
|
| 3034 |
fn=run_genesis_prediction,
|