mailboxlab11 commited on
Commit
c730b12
Β·
verified Β·
1 Parent(s): aec6861

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -39,19 +39,18 @@ st.set_page_config(page_title="Rainfall EWS", layout="centered")
39
  st.title("🌧 Rainfall Early Warning System")
40
  st.markdown("Use this tool to predict rain based on weather features and build a real-time dataset.")
41
 
42
- # --- Input Form ---
43
  with st.form("weather_form"):
44
  st.header("πŸ“‹ Enter Weather Conditions")
45
  col1, col2 = st.columns(2)
46
 
47
  with col1:
48
- temp = st.slider("🌑 Temperature (°C)", 10.0, 50.0, 30.0)
49
- humidity = st.slider("πŸ’§ Humidity (%)", 10, 100, 60)
50
- pressure = st.slider("πŸ”΅ Air Pressure (kPa)", 980, 1030, 1005)
51
 
52
  with col2:
53
- wind_speed = st.slider("🌬 Wind Speed (m/s)", 0.0, 10.0, 2.0)
54
- wind_dir = st.slider("🧭 Wind Direction (°)", 0, 360, 180)
55
  entry_date = st.date_input("πŸ“† Entry Date", value=date.today())
56
 
57
  rain_label = st.selectbox("🌦 Did it rain?", ["No", "Yes"])
@@ -59,6 +58,7 @@ with st.form("weather_form"):
59
 
60
  submitted = st.form_submit_button("βœ… Submit and Predict")
61
 
 
62
  # --- Process Input ---
63
  if submitted:
64
  # Calculate the next day based on the entry date
 
39
  st.title("🌧 Rainfall Early Warning System")
40
  st.markdown("Use this tool to predict rain based on weather features and build a real-time dataset.")
41
 
 
42
  with st.form("weather_form"):
43
  st.header("πŸ“‹ Enter Weather Conditions")
44
  col1, col2 = st.columns(2)
45
 
46
  with col1:
47
+ temp = st.slider("🌑 Temperature (°C)", min_value=0.0, max_value=60.0, value=30.0)
48
+ humidity = st.slider("πŸ’§ Humidity (%)", min_value=0, max_value=100, value=60)
49
+ pressure = st.slider("πŸ”΅ Air Pressure (kPa)", min_value=870.0, max_value=1085.0, value=1005.0)
50
 
51
  with col2:
52
+ wind_speed = st.slider("🌬 Wind Speed (m/s)", min_value=0.0, max_value=100.0, value=5.0)
53
+ wind_dir = st.slider("🧭 Wind Direction (°)", min_value=0, max_value=360, value=180)
54
  entry_date = st.date_input("πŸ“† Entry Date", value=date.today())
55
 
56
  rain_label = st.selectbox("🌦 Did it rain?", ["No", "Yes"])
 
58
 
59
  submitted = st.form_submit_button("βœ… Submit and Predict")
60
 
61
+
62
  # --- Process Input ---
63
  if submitted:
64
  # Calculate the next day based on the entry date