Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,17 +5,17 @@ import requests
|
|
| 5 |
# Set the title of the Streamlit app
|
| 6 |
st.title("Sales Prediction")
|
| 7 |
|
| 8 |
-
# Collect user input
|
| 9 |
-
product_weight = st.number_input("Weight of the product", min_value=0.0, value=
|
| 10 |
-
product_allocated_area = st.number_input("Product Allocated Area",
|
| 11 |
-
product_mrp = st.number_input("Product MRP", min_value=1.0, step=1.0, value=
|
| 12 |
-
store_establishment_year = st.selectbox("Store Establishment Year", [
|
| 13 |
-
product_sugar_content = st.selectbox("Product Sugar Content", ["Low", "
|
| 14 |
-
product_type = st.selectbox("Product Type", ["Snack Foods", "
|
| 15 |
-
store_id = st.
|
| 16 |
store_size = st.selectbox("Store Size", ["Small", "Medium", "High"])
|
| 17 |
-
store_location_city_type = st.selectbox("Store Location City Type", ["
|
| 18 |
-
store_type = st.selectbox("Store Type", ["
|
| 19 |
|
| 20 |
# Create input dictionary
|
| 21 |
input_data = {
|
|
|
|
| 5 |
# Set the title of the Streamlit app
|
| 6 |
st.title("Sales Prediction")
|
| 7 |
|
| 8 |
+
# Collect user input, default value as average of provided values, or alphabetical order
|
| 9 |
+
product_weight = st.number_input("Weight of the product", min_value=0.0, value=12.0)
|
| 10 |
+
product_allocated_area = st.number_input("Product Allocated Area",min_value=0.0,value=0.068,step=0.001,format="%.3f")
|
| 11 |
+
product_mrp = st.number_input("Product MRP", min_value=1.0, step=1.0, value=147.0)
|
| 12 |
+
store_establishment_year = st.selectbox("Store Establishment Year", [1987, 1998, 1999, 2009])
|
| 13 |
+
product_sugar_content = st.selectbox("Product Sugar Content", ["Low Sugar", "No Sugar", "Regular"])
|
| 14 |
+
product_type = st.selectbox("Product Type", ["Baking Goods", "Breads", "Breakfast", "Canned", "Dairy", "Frozen Foods", "Fruits and Vegetables", "Hard Drinks", "Health and Hygiene", "Household", "Meat", "Others", "Seafood", "Snack Foods", "Soft Drinks", "Starchy Foods"])
|
| 15 |
+
store_id = st.selectbox("Store ID", ["OUT004", "OUT003", "OUT001","OUT002"])
|
| 16 |
store_size = st.selectbox("Store Size", ["Small", "Medium", "High"])
|
| 17 |
+
store_location_city_type = st.selectbox("Store Location City Type", ["Tier 1", "Tier 2", "Tier 3"])
|
| 18 |
+
store_type = st.selectbox("Store Type", ["Departmental Store", "Food Mart", "Supermarket Type1", "Supermarket Type2"])
|
| 19 |
|
| 20 |
# Create input dictionary
|
| 21 |
input_data = {
|