Shubhvedi commited on
Commit
1cd70c9
1 Parent(s): ed21f85
Files changed (1) hide show
  1. app.py +13 -0
app.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+
4
+ def predict_image(img):
5
+ img_3d=img.reshape(-1,28,28)
6
+ im_resize=img_3d/255.0
7
+ prediction=model.predict(im_resize)
8
+ pred=np.argmax(input_prediction)
9
+ return pred
10
+
11
+ iface = gr.Interface(predict_image, inputs="sketchpad", outputs="label")
12
+
13
+ iface.launch(debug='False')