cheeka84 commited on
Commit
75aa235
·
verified ·
1 Parent(s): 795fe43

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -44,10 +44,10 @@ input_data = pd.DataFrame([{
44
  if st.button("Predict"):
45
  response = requests.post("https://cheeka84-SalesPredictionBackend.hf.space/v1/sales", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
46
  if response.status_code == 200:
47
- prediction = response.json()['Predicted Price (in dollars)']
48
- st.success(f"Predicted Rental Price (in dollars): {prediction}")
49
  else:
50
- st.error("Error making prediction.")
51
 
52
  # Section for batch prediction
53
  st.subheader("Batch Prediction")
 
44
  if st.button("Predict"):
45
  response = requests.post("https://cheeka84-SalesPredictionBackend.hf.space/v1/sales", json=input_data.to_dict(orient='records')[0]) # Send data to Flask API
46
  if response.status_code == 200:
47
+ prediction = response.json()['Predicted Sales (in dollars)']
48
+ st.success(f"Predicted Sales (in dollars): {prediction}")
49
  else:
50
+ st.error(response.status_code)
51
 
52
  # Section for batch prediction
53
  st.subheader("Batch Prediction")