Spaces:
Sleeping
Sleeping
deploy at 2024-08-24 21:01:59.108053
Browse files
main.py
CHANGED
@@ -1,21 +1,38 @@
|
|
1 |
from fasthtml_hf import setup_hf_backup
|
2 |
from fasthtml.common import *
|
|
|
3 |
#import io
|
4 |
#import base64
|
5 |
|
6 |
-
app = FastHTML()
|
7 |
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
Div(id="canvasContainer"),
|
13 |
-
P("Probability: --", id="probability"),
|
14 |
-
Button("Clear", id="clearButton"),
|
15 |
-
#ScriptX('digitDrawer.js')
|
16 |
-
)
|
17 |
|
18 |
setup_hf_backup(app)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
-
if __name__ == "__main__":
|
21 |
-
|
|
|
1 |
from fasthtml_hf import setup_hf_backup
|
2 |
from fasthtml.common import *
|
3 |
+
#from fastai.vision.all import *
|
4 |
#import io
|
5 |
#import base64
|
6 |
|
|
|
7 |
|
8 |
+
app,rt = fast_app()
|
9 |
+
|
10 |
+
@rt('/')
|
11 |
+
def get(): return Div(P('Hello World!'), hx_get="/change")
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
setup_hf_backup(app)
|
14 |
+
serve()
|
15 |
+
|
16 |
+
|
17 |
+
|
18 |
+
# from fasthtml_hf import setup_hf_backup
|
19 |
+
# from fasthtml.common import *
|
20 |
+
# #import io
|
21 |
+
# #import base64
|
22 |
+
|
23 |
+
# app = FastHTML()
|
24 |
+
|
25 |
+
# @app.get("/")
|
26 |
+
# def home():
|
27 |
+
# return Title("Digit Drawer"), Main(
|
28 |
+
# H1("Digit Drawer"),
|
29 |
+
# Div(id="canvasContainer"),
|
30 |
+
# P("Probability: --", id="probability"),
|
31 |
+
# Button("Clear", id="clearButton"),
|
32 |
+
# #ScriptX('digitDrawer.js')
|
33 |
+
# )
|
34 |
+
|
35 |
+
# setup_hf_backup(app)
|
36 |
|
37 |
+
# if __name__ == "__main__":
|
38 |
+
# serve(app)
|