Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
|
|
3 |
|
4 |
-
|
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])
|
|
|
1 |
import gradio as gr
|
2 |
import numpy as np
|
3 |
+
from tensorflow import keras
|
4 |
|
5 |
+
model = keras.models.load_model('my_model')
|
6 |
|
|
|
7 |
def predict(img):
|
8 |
img = np.expand_dims(img, axis=0)
|
9 |
return np.argmax(model.predict(img)[0])
|