imperialwool commited on
Commit
47ca12e
1 Parent(s): 8aa665c
Files changed (2) hide show
  1. app.py +12 -10
  2. requirements.txt +5 -5
app.py CHANGED
@@ -26,16 +26,6 @@ def forbidden_handler(e): return render_template('forbidden.html')
26
  @app.errorhandler(404)
27
  def ratelimit_handler(e): return render_template('notfound.html')
28
 
29
- # site routes
30
- @app.route('/')
31
- @limiter.exempt
32
- def index(): return render_template('index.html')
33
- # sig gen
34
- @app.route('/signatures/api/v1/get', methods=['GET', 'POST'])
35
- @limiter.exempt
36
- def signatureGen():
37
- return siteRoutes.signatureGen(request)
38
-
39
  #empty routes
40
  @app.route('/yt/api/v1', methods=['GET', 'POST'])
41
  @app.route('/recognize/api/v1', methods=['GET', 'POST'])
@@ -52,6 +42,18 @@ def emptyApiWA(path): return {"status": "error", "error_code": 100, "error_deta
52
  @limiter.exempt
53
  def favicon(): return send_from_directory(os.path.join(app.root_path, 'static'), 'favicon.ico', mimetype='image/vnd.microsoft.icon')
54
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  ###############
56
  #RECOGNIZE API
57
  @app.route('/recognize/api/v1/voice', methods=['GET', 'POST'])
 
26
  @app.errorhandler(404)
27
  def ratelimit_handler(e): return render_template('notfound.html')
28
 
 
 
 
 
 
 
 
 
 
 
29
  #empty routes
30
  @app.route('/yt/api/v1', methods=['GET', 'POST'])
31
  @app.route('/recognize/api/v1', methods=['GET', 'POST'])
 
42
  @limiter.exempt
43
  def favicon(): return send_from_directory(os.path.join(app.root_path, 'static'), 'favicon.ico', mimetype='image/vnd.microsoft.icon')
44
 
45
+ ###############
46
+ #SITE ROUTES
47
+ @app.route('/')
48
+ @limiter.exempt
49
+ def index(): return render_template('index.html')
50
+ @app.route('/signatures/api/v1/get', methods=['GET', 'POST'])
51
+ @limiter.exempt
52
+ def signatureGen(): return siteRoutes.signatureGen(request)
53
+ @app.route('/system-info/api/v1/get', methods=['GET', 'POST'])
54
+ @limiter.exempt
55
+ def systemInfo(): return siteRoutes.systemInfo(request)
56
+
57
  ###############
58
  #RECOGNIZE API
59
  @app.route('/recognize/api/v1/voice', methods=['GET', 'POST'])
requirements.txt CHANGED
@@ -1,9 +1,9 @@
 
1
  flask
2
- flask_limiter
3
- requests
4
  ffmpeg
5
- wget
6
  yt_dlp
7
  urllib3
8
- psutil
9
- cpuinfo
 
 
1
+ wget
2
  flask
 
 
3
  ffmpeg
4
+ psutil
5
  yt_dlp
6
  urllib3
7
+ requests
8
+ py-cpuinfo
9
+ flask_limiter