lterriel commited on
Commit
ffa6434
β€’
1 Parent(s): 4263b49

new structure app

Browse files
.DS_Store CHANGED
Binary files a/.DS_Store and b/.DS_Store differ
 
.gitignore ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ .idea
2
+ .DS_STORE
3
+ .__pycache__/
__pycache__/config.cpython-311.pyc ADDED
Binary file (1.57 kB). View file
 
app.py CHANGED
@@ -1,4 +1,4 @@
1
  from config import app
2
 
3
  if __name__ == "__main__":
4
- app.run(host="0.0.0.0", port=7860)
 
1
  from config import app
2
 
3
  if __name__ == "__main__":
4
+ app.run()
config.py CHANGED
@@ -25,5 +25,5 @@ app.config["KAMI_OPT_PERC"] = True
25
  app.config["KAMI_OPT_ROUND"] = '0.001'
26
  app.config['KAMI_VERSION'] = pkg_version("kamilib-light")
27
 
28
- from .views import index, cant_find_page, server_unavailable
29
 
 
25
  app.config["KAMI_OPT_ROUND"] = '0.001'
26
  app.config['KAMI_VERSION'] = pkg_version("kamilib-light")
27
 
28
+ from modules.views import index, cant_find_page, server_unavailable
29
 
modules/__init__.py ADDED
File without changes
constants.py β†’ modules/constants.py RENAMED
File without changes
utils.py β†’ modules/utils.py RENAMED
@@ -7,7 +7,7 @@ from numba import njit, jit
7
  # import pandas as pd
8
  import numpy as np
9
 
10
- from .constants import MAPPING_TITLES, MAPPING_SCORES_INDEX
11
 
12
 
13
  @njit(fastmath=True)
 
7
  # import pandas as pd
8
  import numpy as np
9
 
10
+ from modules.constants import MAPPING_TITLES, MAPPING_SCORES_INDEX
11
 
12
 
13
  @njit(fastmath=True)
views.py β†’ modules/views.py RENAMED
@@ -2,11 +2,11 @@
2
 
3
  from unicodedata import normalize
4
 
5
- from flask import render_template, request, jsonify, flash, redirect, url_for, abort
6
- from kami_light.Kami import Kami
7
 
8
- from .config import app
9
- from .utils import serialize_scores, show_diff_color_html
10
 
11
 
12
  @app.route('/')
 
2
 
3
  from unicodedata import normalize
4
 
5
+ from flask import render_template, request, jsonify
6
+ from kami.Kami import Kami
7
 
8
+ from config import app
9
+ from modules.utils import serialize_scores, show_diff_color_html
10
 
11
 
12
  @app.route('/')
requirements.txt CHANGED
@@ -1,11 +1,5 @@
1
- Flask==2.0.1
2
- gunicorn==20.0.4
3
- kamilib-light==0.1.1
4
- pandas==1.3.3
5
- numba==0.55.1
6
-
7
- # for heroku specifically
8
- #-r requirements_heroku.txt
9
- #-f https://download.pytorch.org/whl/torch_stable.html
10
- #torch==1.7.0+cpu
11
- #torchvision==0.8.1+cpu
 
1
+ flask
2
+ gunicorn
3
+ kamilib==0.1.2
4
+ pandas
5
+ numba