Skip to content

Instantly share code, notes, and snippets.

@gaganmanku96
Created November 5, 2019 17:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gaganmanku96/ff8289917121fea6d75ad77655c3fc3e to your computer and use it in GitHub Desktop.
Save gaganmanku96/ff8289917121fea6d75ad77655c3fc3e to your computer and use it in GitHub Desktop.
from flask import Flask, request
app = Flask(__name__)
@app.route('/predict', methods=['POST'])
def print_square():
recieved_value = int(request.get_json(force=True))
print(recieved_value)
return str(recieved_value**2)
if __name__ == "__main__":
app.run(host='0.0.0.0')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment