Spaces:
Runtime error
Runtime error
DeathDaDev
commited on
Commit
•
0686433
1
Parent(s):
57775d5
feat: add health check endpoint to indicate server status for Hugging Face Spaces
Browse files
app.py
CHANGED
@@ -27,5 +27,7 @@ def generate():
|
|
27 |
response = "This is a placeholder response"
|
28 |
return jsonify({"response": response})
|
29 |
|
30 |
-
|
|
|
|
|
31 |
app.run(host="0.0.0.0", port=5000, debug=True)
|
|
|
27 |
response = "This is a placeholder response"
|
28 |
return jsonify({"response": response})
|
29 |
|
30 |
+
@app.route("/health")
|
31 |
+
def health():
|
32 |
+
return jsonify({"status": "running"}), 200
|
33 |
app.run(host="0.0.0.0", port=5000, debug=True)
|