maddykan101 commited on
Commit
2dc0819
·
verified ·
1 Parent(s): 25b1a25

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
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=2.0)
10
- product_allocated_area = st.number_input("Product Allocated Area", min_value=1.0, value=2.0)
11
- product_mrp = st.number_input("Product MRP", min_value=1.0, step=1.0, value=10.0)
12
- store_establishment_year = st.selectbox("Store Establishment Year", [2005, 2010, 2015, 2020])
13
- product_sugar_content = st.selectbox("Product Sugar Content", ["Low", "Normal", "High"])
14
- product_type = st.selectbox("Product Type", ["Snack Foods", "Dairy", "Beverages"])
15
- store_id = st.text_input("Store ID", value="STR001")
16
  store_size = st.selectbox("Store Size", ["Small", "Medium", "High"])
17
- store_location_city_type = st.selectbox("Store Location City Type", ["Urban", "Semi-Urban", "Rural"])
18
- store_type = st.selectbox("Store Type", ["Supermarket Type1", "Supermarket Type2", "Grocery Store"])
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 = {