ogegadavis254 commited on
Commit
e003f26
·
verified ·
1 Parent(s): 8be793a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -3
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
- # Generate a line chart to show the relationship between temperature and humidity
 
 
 
 
143
  fig, ax = plt.subplots()
144
- ax.plot(results_data['Condition'], results_data['Value'], marker='o')
 
145
  ax.set_ylabel('Values')
146
- ax.set_title('Relationship Between Climate Conditions')
 
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: