vishalbakshi commited on
Commit
bfb5f52
·
verified ·
1 Parent(s): fe0e8cd

deploy at 2024-08-23 21:46:52.312850

Browse files
Files changed (2) hide show
  1. main.py +2 -4
  2. requirements.txt +1 -0
main.py CHANGED
@@ -1,8 +1,7 @@
1
  from fasthtml_hf import setup_hf_backup
2
  from fasthtml.common import *
3
- from fasthtml import serve as fasthtml_serve
4
  #from fastai.vision.all import * # Uncomment this when you're ready to use fastai
5
- #import uvicorn
6
 
7
  # Create the FastHTML app
8
  app = FastHTML()
@@ -16,11 +15,10 @@ setup_hf_backup(app)
16
 
17
  # Use this if serve() doesn't work
18
  # if __name__ == "__main__":
19
- # uvicorn.run("app:app", host="0.0.0.0", port=7860, reload=True)
20
 
21
  # Alternatively, try using serve() if uvicorn doesn't work
22
  #serve()
23
- fasthtml_serve()
24
 
25
 
26
  # from fasthtml_hf import setup_hf_backup
 
1
  from fasthtml_hf import setup_hf_backup
2
  from fasthtml.common import *
 
3
  #from fastai.vision.all import * # Uncomment this when you're ready to use fastai
4
+ import uvicorn
5
 
6
  # Create the FastHTML app
7
  app = FastHTML()
 
15
 
16
  # Use this if serve() doesn't work
17
  # if __name__ == "__main__":
18
+ uvicorn.run("app:app", host="0.0.0.0", port=7860, reload=True)
19
 
20
  # Alternatively, try using serve() if uvicorn doesn't work
21
  #serve()
 
22
 
23
 
24
  # from fasthtml_hf import setup_hf_backup
requirements.txt CHANGED
@@ -1,3 +1,4 @@
1
  fastai==2.7.16
2
  python-fasthtml
3
  fasthtml-hf
 
 
1
  fastai==2.7.16
2
  python-fasthtml
3
  fasthtml-hf
4
+ uvicorn