Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. from __future__ import absolute_import, division, print_function
  2. from flask import Flask, jsonify, request
  3. from flask_cors import CORS
  4. import model
  5.  
  6. app = Flask(__name__)
  7. CORS(app)
  8.  
  9. @app.route('/niche_classifier/', methods=['GET'])
  10. def classification():
  11. folderpath = request.args["folderpath"]
  12. return jsonify(model.calculate_score(folderpath))
  13.  
  14. @app.route('/hello_world')
  15. def hello_world():
  16. return 'Hello World'
  17.  
  18. if __name__ == '__main__':
  19. app.run(host='0.0.0.0', port=2002, debug=False)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement