Spaces:
Running
Running
Update app/api/routes.py
Browse files- app/api/routes.py +17 -0
app/api/routes.py
CHANGED
|
@@ -176,4 +176,21 @@ async def handle_analyze_food_image():
|
|
| 176 |
|
| 177 |
except Exception as e:
|
| 178 |
return jsonify({"error": str(e)}), 500
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
|
|
|
|
| 176 |
|
| 177 |
except Exception as e:
|
| 178 |
return jsonify({"error": str(e)}), 500
|
| 179 |
+
|
| 180 |
+
@api_bp.route('/health', methods=['GET'])
|
| 181 |
+
def health_check():
|
| 182 |
+
"""
|
| 183 |
+
Simple health check endpoint to keep the space awake.
|
| 184 |
+
Returns a 200 OK status with a basic message.
|
| 185 |
+
"""
|
| 186 |
+
return jsonify({
|
| 187 |
+
"status": "alive",
|
| 188 |
+
"message": "Recipe Recommendation Service is Running",
|
| 189 |
+
"endpoints": [
|
| 190 |
+
"/api/form-data",
|
| 191 |
+
"/api/recommend",
|
| 192 |
+
"/api/extract-recipe-attributes",
|
| 193 |
+
"/api/analyze-food-image"
|
| 194 |
+
]
|
| 195 |
+
}), 200
|
| 196 |
|