deepacsr commited on
Commit
fdc590d
·
verified ·
1 Parent(s): 86e35aa

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -36,7 +36,7 @@ if st.button("Predict"):
36
  if response.status_code == 200:
37
  prediction = response.json()
38
  st.success("Product sales predictions completed!")
39
- st.success(f"Predicted Rental Price (in dollars): {prediction}")
40
  else:
41
  st.error("Error making prediction.")
42
  st.error(f"Error code: {response.status_code}")
@@ -50,7 +50,7 @@ uploaded_file = st.file_uploader("Upload CSV file for batch prediction", type=["
50
  # Make batch prediction when the "Predict Batch" button is clicked
51
  if uploaded_file is not None:
52
  if st.button("Predict Batch"):
53
- files = {"file": (uploaded_file.name, uploaded_file.getvalue(), "text\csv")}
54
  response = requests.post("https://deepacsr-RentalPricePredictionBackend.hf.space/v1/ProductBatchSales",files=files) # Send file to Flask API
55
  if response.status_code == 200:
56
  predictions = response.json()
 
36
  if response.status_code == 200:
37
  prediction = response.json()
38
  st.success("Product sales predictions completed!")
39
+ st.success(f"Predicted Sales Price (in dollars): {prediction}")
40
  else:
41
  st.error("Error making prediction.")
42
  st.error(f"Error code: {response.status_code}")
 
50
  # Make batch prediction when the "Predict Batch" button is clicked
51
  if uploaded_file is not None:
52
  if st.button("Predict Batch"):
53
+ files = {"file": (uploaded_file.name, uploaded_file.getvalue(), "text/csv")}
54
  response = requests.post("https://deepacsr-RentalPricePredictionBackend.hf.space/v1/ProductBatchSales",files=files) # Send file to Flask API
55
  if response.status_code == 200:
56
  predictions = response.json()