SHARE
TWEET

Untitled

a guest Sep 19th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top