Reshama commited on
Commit
19dd17f
·
verified ·
1 Parent(s): 7a1b386

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py CHANGED
@@ -4,10 +4,25 @@ from llms import prompt_llm_image, prompt_llm, parse_bullet_points
4
  app = Flask(__name__)
5
 
6
 
 
 
7
  @app.get("/health")
8
  def health():
9
  return jsonify(status="ok")
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  app.secret_key = "32fe450cc58c8e1487b36b9e7f06d349f67afa85d4a074e151a75e5f39517d0c"
13
  UPLOAD_FOLDER = "uploads"
 
4
  app = Flask(__name__)
5
 
6
 
7
+ from flask import jsonify
8
+
9
  @app.get("/health")
10
  def health():
11
  return jsonify(status="ok")
12
 
13
+ @app.get("/_routes")
14
+ def _routes():
15
+ # show all registered routes so we can confirm what's live
16
+ routes = []
17
+ for rule in app.url_map.iter_rules():
18
+ routes.append({
19
+ "endpoint": rule.endpoint,
20
+ "methods": sorted(list(rule.methods - {"HEAD", "OPTIONS"})),
21
+ "rule": str(rule)
22
+ })
23
+ return jsonify(routes=sorted(routes, key=lambda r: r["rule"]))
24
+
25
+
26
 
27
  app.secret_key = "32fe450cc58c8e1487b36b9e7f06d349f67afa85d4a074e151a75e5f39517d0c"
28
  UPLOAD_FOLDER = "uploads"