Last active
April 16, 2020 13:24
-
-
Save gaganmanku96/aa6ef00bd19fcef9a8877fb68d6f50c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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