jph00 commited on
Commit
148a439
1 Parent(s): e706112

deploy at 2024-06-29 16:48:08.440633

Browse files
Files changed (1) hide show
  1. main.py +2 -4
main.py CHANGED
@@ -1,5 +1,5 @@
1
  from fasthtml.common import *
2
- from fasthtml_hf import upload, download
3
 
4
  db = database("data/utodos.db")
5
  todos,users = db.t.todos,db.t.users
@@ -74,7 +74,5 @@ async def get(id:int):
74
  target_id=tid(todo.id), hx_swap="outerHTML")
75
  return Div(Div(todo.title), btn)
76
 
77
- app.on_event("startup")(download)
78
- app.on_event("shutdown")(upload)
79
-
80
  run_uv()
 
1
  from fasthtml.common import *
2
+ from fasthtml_hf import setup_hf_backup
3
 
4
  db = database("data/utodos.db")
5
  todos,users = db.t.todos,db.t.users
 
74
  target_id=tid(todo.id), hx_swap="outerHTML")
75
  return Div(Div(todo.title), btn)
76
 
77
+ setup_hf_backup(app)
 
 
78
  run_uv()