Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
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("ISYS/MyNewModel")
|
7 |
+
|
8 |
+
def greet(img):
|
9 |
+
img = np.expand_dims(img, axis=0)
|
10 |
+
return np.argmax(model.predict(img)[0])
|
11 |
+
|
12 |
+
iface = gr.Interface(fn=greet, inputs="sketchpad", outputs="text")
|
13 |
+
iface.launch()
|