Mr00Magician commited on
Commit
0084ec6
1 Parent(s): 4c985f6

Delete app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -18
app.py DELETED
@@ -1,18 +0,0 @@
1
- import gradio as gr
2
- from tensorflow import keras as k
3
- import numpy as np
4
-
5
- loaded_SNN = k.models.load_model('SequentialNN.h5')
6
-
7
- def predict(img):
8
- img_array = np.array(img)
9
- img_array = np.array(img_array, dtype = 'int32').reshape(1, 28, 28)
10
-
11
- pred = loaded_SNN.predict([img_array])
12
- return np.argmax(pred)
13
-
14
- iface = gr.Interface(predict, inputs = 'sketchpad',
15
- outputs = 'text',
16
- allow_flagging = 'never',
17
- description = 'Draw a Digit Below... (Draw in the centre for best results)')
18
- iface.launch(share = True, width = 500, height = 500)