Jensen-holm commited on
Commit
2c9d2bf
·
1 Parent(s): deecb43

adding cors support for this api because we are starting to work on our web application

Browse files
Files changed (3) hide show
  1. .gitignore +0 -1
  2. app.py +3 -0
  3. requirements.txt +6 -3
.gitignore CHANGED
@@ -128,7 +128,6 @@ dmypy.json
128
  # Pyre type checker
129
  .pyre/
130
 
131
-
132
  .idea
133
 
134
  .vscode
 
128
  # Pyre type checker
129
  .pyre/
130
 
 
131
  .idea
132
 
133
  .vscode
app.py CHANGED
@@ -1,4 +1,5 @@
1
  from flask import Flask, request, jsonify, make_response, render_template
 
2
 
3
  from dataset.iris import iris
4
  from opts import options
@@ -8,6 +9,8 @@ app = Flask(
8
  template_folder="templates",
9
  )
10
 
 
 
11
 
12
  def not_valid(params: dict):
13
  """
 
1
  from flask import Flask, request, jsonify, make_response, render_template
2
+ from flask_cors import CORS
3
 
4
  from dataset.iris import iris
5
  from opts import options
 
9
  template_folder="templates",
10
  )
11
 
12
+ CORS(app)
13
+
14
 
15
  def not_valid(params: dict):
16
  """
requirements.txt CHANGED
@@ -1,5 +1,8 @@
1
  Flask==2.2.3
 
 
 
 
 
 
2
  gunicorn==20.1.0
3
-
4
- numpy~=1.24.2
5
- scikit-learn~=1.2.2
 
1
  Flask==2.2.3
2
+ flask_cors==3.0.10
3
+ matplotlib==3.7.1
4
+ numpy==1.24.2
5
+ requests==2.28.2
6
+ scikit_learn==1.2.2
7
+ seaborn==0.12.2
8
  gunicorn==20.1.0