Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -139,11 +139,17 @@ if st.button("Generate Prediction"):
|
|
139 |
st.markdown("**Predicted Impact on Performance and Infrastructure:**")
|
140 |
st.markdown(generated_text.strip())
|
141 |
|
142 |
-
#
|
|
|
|
|
|
|
|
|
143 |
fig, ax = plt.subplots()
|
144 |
-
|
|
|
145 |
ax.set_ylabel('Values')
|
146 |
-
ax.set_title('Relationship Between
|
|
|
147 |
st.pyplot(fig)
|
148 |
|
149 |
except ValueError as ve:
|
|
|
139 |
st.markdown("**Predicted Impact on Performance and Infrastructure:**")
|
140 |
st.markdown(generated_text.strip())
|
141 |
|
142 |
+
# Select conditions to visualize
|
143 |
+
conditions = ["Humidity", "Wind Speed", "UV Index", "Air Quality Index", "Precipitation", "Atmospheric Pressure"]
|
144 |
+
selected_conditions = st.multiselect("Select conditions to visualize against Temperature:", conditions, default=conditions)
|
145 |
+
|
146 |
+
# Generate a line chart to show the relationship between temperature and selected conditions
|
147 |
fig, ax = plt.subplots()
|
148 |
+
for condition in selected_conditions:
|
149 |
+
ax.plot(["Temperature", condition], [temperature, results_data["Value"][results_data["Condition"].index(condition)]], marker='o', label=condition)
|
150 |
ax.set_ylabel('Values')
|
151 |
+
ax.set_title('Relationship Between Temperature and Selected Conditions')
|
152 |
+
ax.legend()
|
153 |
st.pyplot(fig)
|
154 |
|
155 |
except ValueError as ve:
|