-
Notifications
You must be signed in to change notification settings - Fork 354
Open
Description
To ensure the usage with flask > 2.0 and flask restful > 0.3.6:
Just simply change two places:
1.Change the requirements.txt, delete version for flask, flask-restful and future
Flask
Flask-RESTful
gensim==3.6.0
future
2.Add & update word2vec-api.py
Wherever you use parser.add_argument, you may add location=['args'] to the params
For example:
Previous: parser.add_argument('w1', type=str, required=True, help="Word 1 cannot be blank!")
After: parser.add_argument('w1', type=str, required=True, help="Word 1 cannot be blank!", location=['args'])

(Optional) if you want to request your api through front-end, just simply add "cors = CORS(app)" after "app = Flask(name)"

Hope it would be helpful~
Miikegill
Metadata
Metadata
Assignees
Labels
No labels