File size: 544 Bytes
f58afc8
0854d0c
f58afc8
4cc2bc5
f58afc8
be6f465
396a9b5
 
626e255
e2e7054
 
891bc17
626e255
e2e7054
626e255
6cb2106
e2e7054
626e255
0854d0c
 
626e255
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from fasthtml_hf import setup_hf_backup
from fasthtml.common import *

custom_css_link = Link(rel="stylesheet", href="styles.css")

app, rt = fast_app(hdrs=(custom_css_link,))

@rt('/')
def home():
    return Title("Is It a Digit?"), Main(
        H1("Is It a Digit?"),
        P("Draw on the canvas below"),
        Div(id="canvasContainer"),
        P("Probability it's a digit: --", id="probability"),
        Button("Clear", id="clearButton"),
        ScriptX('digitDrawer.js'),
        cls="container"  
    )

setup_hf_backup(app)
serve()