Spaces:
Sleeping
Sleeping
updated app.py file, updated graphs
Browse files
app.py
CHANGED
@@ -19,14 +19,17 @@ def create_graphs():
|
|
19 |
# Wind Speed over Time
|
20 |
fig_wind = px.line(df, x='datetime', y='windspeed', title='Wind Speed Over Time')
|
21 |
|
|
|
|
|
|
|
22 |
# Return multiple graphs
|
23 |
-
return fig_temp, fig_precip, fig_wind
|
24 |
|
25 |
# Create Gradio interface
|
26 |
interface = gr.Interface(
|
27 |
fn=create_graphs,
|
28 |
inputs=None, # No input required, as we are just displaying graphs
|
29 |
-
outputs=[gr.Plot(), gr.Plot(), gr.Plot()], # Multiple graph outputs
|
30 |
title="Weather Data Analysis",
|
31 |
description="This app shows multiple weather analysis graphs based on the dataset."
|
32 |
)
|
|
|
19 |
# Wind Speed over Time
|
20 |
fig_wind = px.line(df, x='datetime', y='windspeed', title='Wind Speed Over Time')
|
21 |
|
22 |
+
df['heat_index'] = df['temp'] + (0.55 - 0.55 * df['humidity'] / 100) * (df['temp'] - 58)
|
23 |
+
fig_heat = px.line(df.groupby('year')['heat_index'].mean(), title='Heat Index Over the Years')
|
24 |
+
|
25 |
# Return multiple graphs
|
26 |
+
return fig_temp, fig_precip, fig_wind, fig_heat
|
27 |
|
28 |
# Create Gradio interface
|
29 |
interface = gr.Interface(
|
30 |
fn=create_graphs,
|
31 |
inputs=None, # No input required, as we are just displaying graphs
|
32 |
+
outputs=[gr.Plot(), gr.Plot(), gr.Plot(), gr.Plot()], # Multiple graph outputs
|
33 |
title="Weather Data Analysis",
|
34 |
description="This app shows multiple weather analysis graphs based on the dataset."
|
35 |
)
|