Maulidaaa commited on
Commit
189dd44
·
verified ·
1 Parent(s): f1004e7

Upload __init__.py

Browse files
Files changed (1) hide show
  1. app/__init__.py +23 -0
app/__init__.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask
2
+ from app.routes import analyze_blueprint
3
+
4
+ def create_app():
5
+ app = Flask(__name__)
6
+ app.register_blueprint(analyze_blueprint)
7
+
8
+ @app.route("/analyze", methods=["GET"])
9
+ def analyze():
10
+ return {"status": "success", "msg": "analyze route works"}
11
+
12
+ @app.route("/")
13
+ def home():
14
+ return """
15
+ <h2>🧴 Skincare Safety API is Running</h2>
16
+ <p>Use <code>POST /analyze</code> with form-data or JSON:</p>
17
+ <ul>
18
+ <li><strong>ingredients</strong> (image or string)</li>
19
+ <li>or <strong>image</strong> (fallback OCR)</li>
20
+ </ul>
21
+ """
22
+
23
+ return app