From 0894ddb74f9bb9857b19788da878f88ff3032850 Mon Sep 17 00:00:00 2001 From: adoringonion Date: Thu, 19 Mar 2020 01:23:14 +0900 Subject: [PATCH] =?UTF-8?q?CORS=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 2 ++ requirements.txt | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index f430112..ba6aa44 100644 --- a/app.py +++ b/app.py @@ -4,8 +4,10 @@ import xml.etree.ElementTree as ET import json import settings +from flask_cors import CORS app = Flask(__name__) +CORS(app) model = Doc2Vec.load('models/doc2_1.model') yahoo_url = 'https://jlp.yahooapis.jp/MAService/V1/parse' diff --git a/requirements.txt b/requirements.txt index 349dedb..da97f01 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ Flask gensim gunicorn -python-dotenv \ No newline at end of file +python-dotenv +flask_cors \ No newline at end of file