test_deployment / app.py
tosanoob's picture
Upload app.py
947b25c verified
raw
history blame
415 Bytes
# app.py
from flask import Flask, request, jsonify
app = Flask(__name__)
@app.route('/')
def home():
return "Welcome to the Python API!"
@app.route('/predict', methods=['POST'])
def predict():
data = request.json
# Here you would include your model prediction logic
return jsonify({"prediction": "some result"})
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8000)