File size: 655 Bytes
189dd44
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from flask import Flask
from app.routes import analyze_blueprint

def create_app():
    app = Flask(__name__)
    app.register_blueprint(analyze_blueprint)

    @app.route("/analyze", methods=["GET"])
    def analyze():
        return {"status": "success", "msg": "analyze route works"}
        
    @app.route("/")
    def home():
        return """
        <h2>🧴 Skincare Safety API is Running</h2>
        <p>Use <code>POST /analyze</code> with form-data or JSON:</p>
        <ul>
          <li><strong>ingredients</strong> (image or string)</li>
          <li>or <strong>image</strong> (fallback OCR)</li>
        </ul>
        """

    return app