Spaces:
Sleeping
Sleeping
deploy at 2024-08-23 21:46:52.312850
Browse files- main.py +2 -4
- 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 |
-
|
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 |
-
|
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
|