async def word2vec(request): word = request.args['word'][0] if word in model: return json({'data': model[word]}) return response.json({'message': '404 Not Found'}, status=404)
async def words2vec(request): if 'words' not in request.json: return response.json( {'message': 'Please provide array of words as body'}, status=422) words = request.json['words'] res = {x: model[x] if x in model else None for x in words} return json(res)
async def test(request): return json({"hello": "world"})
async def test(request): return json({"response": "i'm alive"})