Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -89,6 +89,10 @@ def delete_task(task_id):
|
|
| 89 |
def index():
|
| 90 |
return "Task API is running."
|
| 91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
if __name__ == "__main__":
|
| 93 |
# Ensure the database exists before the first request
|
| 94 |
if not os.path.isfile(DATABASE):
|
|
|
|
| 89 |
def index():
|
| 90 |
return "Task API is running."
|
| 91 |
|
| 92 |
+
@app.errorhandler(404)
|
| 93 |
+
def not_found(e):
|
| 94 |
+
return jsonify({"error": "not found"}), 404
|
| 95 |
+
|
| 96 |
if __name__ == "__main__":
|
| 97 |
# Ensure the database exists before the first request
|
| 98 |
if not os.path.isfile(DATABASE):
|