Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,15 +9,15 @@ st.title("🛒 BigMart Sales Prediction")
|
|
9 |
st.markdown("Enter item details below to predict sales:")
|
10 |
|
11 |
# Input fields
|
12 |
-
|
13 |
item_weight = st.number_input("⚖️ Item Weight (in kg)", min_value=0.0, step=0.1)
|
14 |
item_visibility = st.slider("👀 Item Visibility", 0.0, 1.0, 0.05)
|
15 |
item_mrp = st.number_input("💰 Item MRP", min_value=0.0, step=1.0)
|
16 |
|
17 |
# Predict button
|
18 |
if st.button("Predict Sales"):
|
19 |
-
if not
|
20 |
-
st.warning("Please enter a
|
21 |
else:
|
22 |
# Dummy training data for demo
|
23 |
X_train = np.array([
|
|
|
9 |
st.markdown("Enter item details below to predict sales:")
|
10 |
|
11 |
# Input fields
|
12 |
+
product_name = st.text_input("📦 Product Name")
|
13 |
item_weight = st.number_input("⚖️ Item Weight (in kg)", min_value=0.0, step=0.1)
|
14 |
item_visibility = st.slider("👀 Item Visibility", 0.0, 1.0, 0.05)
|
15 |
item_mrp = st.number_input("💰 Item MRP", min_value=0.0, step=1.0)
|
16 |
|
17 |
# Predict button
|
18 |
if st.button("Predict Sales"):
|
19 |
+
if not product_name:
|
20 |
+
st.warning("Please enter a product name.")
|
21 |
else:
|
22 |
# Dummy training data for demo
|
23 |
X_train = np.array([
|