Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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)",
|
49 |
-
humidity = st.slider("π§ Humidity (%)",
|
50 |
-
pressure = st.slider("π΅ Air Pressure (kPa)",
|
51 |
|
52 |
with col2:
|
53 |
-
wind_speed = st.slider("π¬ Wind Speed (m/s)", 0.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
|