You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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~
The text was updated successfully, but these errors were encountered:
Vitozhu04
changed the title
update usage with flask
update usage with flask > 2.0
Oct 24, 2022
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~
The text was updated successfully, but these errors were encountered: