Update app.py
Browse files
app.py
CHANGED
@@ -104,7 +104,7 @@ def main():
|
|
104 |
st.image(logo, width=200)
|
105 |
|
106 |
st.title('Real Time SXR AQI Dashboard')
|
107 |
-
st.subheader('Real-time Air Quality Monitoring')
|
108 |
|
109 |
aqi, aqi_level, pm25, pm10, temp = get_aqi_data()
|
110 |
|
@@ -135,7 +135,11 @@ def main():
|
|
135 |
|
136 |
# Display temperature with safety level
|
137 |
st.write(f"- **Temperature:** {temp}˚C")
|
138 |
-
|
|
|
|
|
|
|
|
|
139 |
|
140 |
# Developer section
|
141 |
st.markdown('### Developer:')
|
|
|
104 |
st.image(logo, width=200)
|
105 |
|
106 |
st.title('Real Time SXR AQI Dashboard')
|
107 |
+
st.subheader(f'Real-time Air Quality Monitoring - {datetime.datetime.now(indian_timezone).strftime("%Y-%m-%d %H:%M:%S")}') # Displaying date and time
|
108 |
|
109 |
aqi, aqi_level, pm25, pm10, temp = get_aqi_data()
|
110 |
|
|
|
135 |
|
136 |
# Display temperature with safety level
|
137 |
st.write(f"- **Temperature:** {temp}˚C")
|
138 |
+
temp_safety = check_safety_level(temp, 'Temperature')
|
139 |
+
if temp_safety:
|
140 |
+
st.write(f"Safety Level: {temp_safety}")
|
141 |
+
color_code = COLOR_CODES[temp_safety]
|
142 |
+
st.markdown(f'<p style="color:{color_code};">The temperature level is {temp_safety}.</p>', unsafe_allow_html=True)
|
143 |
|
144 |
# Developer section
|
145 |
st.markdown('### Developer:')
|