Download app/__init__.py from Maulidaaa/predict: direct link, hf CLI and curl.
- Browser
- Download file 655 Bytes
-
https://huggingface.co/spaces/Maulidaaa/predict/resolve/main/app/__init__.py
- Command line
-
hf download hf://spaces/Maulidaaa/predict/app/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/Maulidaaa/predict/resolve/main/app/__init__.py
655 Bytes
| from flask import Flask | |
| from app.routes import analyze_blueprint | |
| def create_app(): | |
| app = Flask(__name__) | |
| app.register_blueprint(analyze_blueprint) | |
| def analyze(): | |
| return {"status": "success", "msg": "analyze route works"} | |
| 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 | |