Okneas commited on
Commit
c1244c8
·
1 Parent(s): bc5ea5a

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import numpy as np
3
+
4
+ from huggingface_hub import from_pretrained_keras
5
+
6
+ model = from_pretrained_keras("Okneas/digits")
7
+ def predict(img):
8
+ img = np.expand_dims(img, axis=0)
9
+ return np.argmax(model.predict(img)[0])
10
+
11
+ demo = gr.Interface(fn=predict, inputs='sketchpad', outputs="text")
12
+
13
+ demo.launch()