dieineb commited on
Commit
d639202
1 Parent(s): 2e71c96

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -0
app.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ title = "Digit Classifier - By Teeny-Tiny Castle 🏰"
4
+
5
+ head = (
6
+ "<center>"
7
+ "<img src='https://upload.wikimedia.org/wikipedia/commons/2/27/MnistExamples.png' width=400>"
8
+ "This model was trained to classify numbers (from 0 to 9). To test it, write your number in the space provided."
9
+ "</center>"
10
+ )
11
+
12
+
13
+ ref = (
14
+ "<center>"
15
+ "Return to the <a href='https://github.com/Nkluge-correa/teeny-tiny_castle)'>castle</a>."
16
+ "</center>")
17
+
18
+ # create interface
19
+ demo = gr.Interface(fn=predict,
20
+ inputs="sketchpad",
21
+ outputs=gr.Label(num_top_classes=3),
22
+ allow_flagging="never",
23
+ title=title,
24
+ description=head,
25
+ article=ref)
26
+
27
+ # launch interface
28
+ demo.launch(inline=False)