CoolFace
Apppublic

shollercoaster/dynamic-pricing

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
app.py18 linesDownload Raw Back to root
1from flask import Flask, request, jsonify2from dynamic_pricing import predict3 4app = Flask(__name__)5@app.route('/predict', methods=['POST'])6def predict():7    # Get data from the request8    data = request.get_json()9 10    # Use your machine learning model to make predictions11    prediction = predict(data)  # Replace with your model code12 13    # Return the prediction as a JSON response14    return jsonify({'prediction': prediction})15 16if __name__ == '__main__':17    app.run(debug=True)18