|
|
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 |
|
|
|