Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -7,28 +7,28 @@ st.title("Product Sales Prediction App")
|
|
| 7 |
st.write("This tool predicts production sales prediction. Enter the required information below.")
|
| 8 |
|
| 9 |
# Collect user input based on dataset columns
|
| 10 |
-
weight = st.number_input("
|
| 11 |
-
sugarcontent = st.selectbox("
|
| 12 |
-
area = st.number_input("
|
| 13 |
-
producttype = st.selectbox("
|
| 14 |
"Breads", "Others", "Starchy Foods", "Seafood"])
|
| 15 |
-
productmrp = st.number_input("
|
| 16 |
-
year = st.number_input("
|
| 17 |
-
storesize = st.selectbox("
|
| 18 |
-
citytype = st.selectbox("
|
| 19 |
-
storetype = st.selectbox("
|
| 20 |
|
| 21 |
# Convert categorical inputs to match model training
|
| 22 |
customer_data = {
|
| 23 |
-
'
|
| 24 |
-
'
|
| 25 |
-
'
|
| 26 |
-
'
|
| 27 |
-
'
|
| 28 |
-
'
|
| 29 |
-
'
|
| 30 |
-
'
|
| 31 |
-
'
|
| 32 |
}
|
| 33 |
|
| 34 |
|
|
|
|
| 7 |
st.write("This tool predicts production sales prediction. Enter the required information below.")
|
| 8 |
|
| 9 |
# Collect user input based on dataset columns
|
| 10 |
+
weight = st.number_input("Product_Weight", min_value=1.0)
|
| 11 |
+
sugarcontent = st.selectbox("Product_Sugar_Content", ["Low Sugar", "No Sugar", "Regular Sugar", "reg"])
|
| 12 |
+
area = st.number_input("Product_Allocated_Area", min_value=1, max_value=9999999)
|
| 13 |
+
producttype = st.selectbox("Product_Type", ["Frozen Foods", "Dairy", "Canned", "Baking Goods", "Health and Hygiene", "Snack Foods", "Meat", "Household", "Hard Drinks", "Fruits and Vegetables",
|
| 14 |
"Breads", "Others", "Starchy Foods", "Seafood"])
|
| 15 |
+
productmrp = st.number_input("Product_MRP", value=100)
|
| 16 |
+
year = st.number_input("Store_Establishment_Year", value=2007)
|
| 17 |
+
storesize = st.selectbox("Store_Size", ["Small", "Medium", "High"])
|
| 18 |
+
citytype = st.selectbox("Store_Location_City_Type", ["Tier1", "Tier2", "Tier3"])
|
| 19 |
+
storetype = st.selectbox("Store_Type", ["Supermarket Type1", "Supermarket Type2", "Food Mart", "Departmental Store"])
|
| 20 |
|
| 21 |
# Convert categorical inputs to match model training
|
| 22 |
customer_data = {
|
| 23 |
+
'Product_Weight': weight,
|
| 24 |
+
'Product_Sugar_Content':sugarcontent,
|
| 25 |
+
'Product_Allocated_Area': area,
|
| 26 |
+
'Product_Type': producttype,
|
| 27 |
+
'Product_MRP': productmrp,
|
| 28 |
+
'Store_Establishment_Year': year,
|
| 29 |
+
'Store_Size': storesize,
|
| 30 |
+
'Store_Location_City_Type': citytype,
|
| 31 |
+
'Store_Type': storetype,
|
| 32 |
}
|
| 33 |
|
| 34 |
|