Skip to content

Instantly share code, notes, and snippets.

@gaganmanku96
Last active April 16, 2020 13:24
Show Gist options
  • Save gaganmanku96/aa6ef00bd19fcef9a8877fb68d6f50c6 to your computer and use it in GitHub Desktop.
Save gaganmanku96/aa6ef00bd19fcef9a8877fb68d6f50c6 to your computer and use it in GitHub Desktop.
from flask import Flask, requests
from ml_model import Model
model = Model()
app = Flask(__name__)
@app.route('/predict', methods=['POST'])
def predict():
recieved_params = requests.get_json(force=True)
output = model.predict(recieved_params)
return output
if __name__ == '__main__':
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment