Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -6,13 +6,13 @@ st.title("SuperKart System")
|
|
| 6 |
# Input fields for product and store data
|
| 7 |
Product_Weight = st.number_input("Product Weight", min_value=0.0, value=12.66)
|
| 8 |
Product_Sugar_Content = st.selectbox("Product Sugar Content", ["Low Sugar", "Regular", "No Sugar"])
|
| 9 |
-
Product_Allocated_Area = st.number_input("Product Allocated Area", min_value=0.0, value=0.
|
| 10 |
-
Product_MRP = st.number_input("Product MRP", min_value=0.0, value=
|
| 11 |
Store_Size = st.selectbox("Store Size", ["Small", "Medium", "High"])
|
| 12 |
Store_Location_City_Type = st.selectbox("Store Location City Type", ["Tier 1", "Tier 2", "Tier 3"])
|
| 13 |
Store_Type = st.selectbox("Store Type", ["Supermarket Type1", "Supermarket Type2", "Supermarket Type3", "Departmental Store","Food Mart"])
|
| 14 |
Product_Id_char = st.selectbox("Product ID Character", ["FD", "DR", "NC"])
|
| 15 |
-
Store_Age_Years = st.number_input("Store Age (Years)", min_value=0, value=
|
| 16 |
Product_Type_Category = st.selectbox("Product Type Category", ["Perishables", "Non Perishables"])
|
| 17 |
|
| 18 |
product_data = {
|
|
@@ -29,7 +29,7 @@ product_data = {
|
|
| 29 |
}
|
| 30 |
|
| 31 |
if st.button("Predict", type='primary'):
|
| 32 |
-
response = requests.post("https://nareshk0201-SuperkartModelDeployment1.hf.space/v1/predict", json=product_data)
|
| 33 |
if response.status_code == 200:
|
| 34 |
result = response.json()
|
| 35 |
predicted_sales = result["Sales"]
|
|
|
|
| 6 |
# Input fields for product and store data
|
| 7 |
Product_Weight = st.number_input("Product Weight", min_value=0.0, value=12.66)
|
| 8 |
Product_Sugar_Content = st.selectbox("Product Sugar Content", ["Low Sugar", "Regular", "No Sugar"])
|
| 9 |
+
Product_Allocated_Area = st.number_input("Product Allocated Area", min_value=0.0, value=0.50)
|
| 10 |
+
Product_MRP = st.number_input("Product MRP", min_value=0.0, value=120)
|
| 11 |
Store_Size = st.selectbox("Store Size", ["Small", "Medium", "High"])
|
| 12 |
Store_Location_City_Type = st.selectbox("Store Location City Type", ["Tier 1", "Tier 2", "Tier 3"])
|
| 13 |
Store_Type = st.selectbox("Store Type", ["Supermarket Type1", "Supermarket Type2", "Supermarket Type3", "Departmental Store","Food Mart"])
|
| 14 |
Product_Id_char = st.selectbox("Product ID Character", ["FD", "DR", "NC"])
|
| 15 |
+
Store_Age_Years = st.number_input("Store Age (Years)", min_value=0, value=12)
|
| 16 |
Product_Type_Category = st.selectbox("Product Type Category", ["Perishables", "Non Perishables"])
|
| 17 |
|
| 18 |
product_data = {
|
|
|
|
| 29 |
}
|
| 30 |
|
| 31 |
if st.button("Predict", type='primary'):
|
| 32 |
+
response = requests.post("https://nareshk0201-SuperkartModelDeployment1.hf.space/v1/predict", json=product_data)
|
| 33 |
if response.status_code == 200:
|
| 34 |
result = response.json()
|
| 35 |
predicted_sales = result["Sales"]
|