app.py
Browse files
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')
|