Cristobal299 commited on
Commit
09341e0
·
verified ·
1 Parent(s): 4a55af0

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +4 -0
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):