ccwizard commited on
Commit
a5c29e4
·
verified ·
1 Parent(s): eb8d7fc

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -52,10 +52,10 @@ def predict_sales():
52
  input_data = pd.DataFrame([sample])
53
 
54
  # Make prediction (get log_price)
55
- predicted_sales = xgb_model.predict(input_data)[0]
56
 
57
  # Return the prediction
58
- return jsonify({'Sales': predicted_sales.tolist()})
59
  except Exception as e:
60
  print(f"Error in prediction: {e}")
61
  return jsonify({'error': str(e)})
 
52
  input_data = pd.DataFrame([sample])
53
 
54
  # Make prediction (get log_price)
55
+ sales_prediction = xgb_model.predict(input_data)[0]
56
 
57
  # Return the prediction
58
+ return jsonify({'Sales': sales_prediction.tolist()})
59
  except Exception as e:
60
  print(f"Error in prediction: {e}")
61
  return jsonify({'error': str(e)})