Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
import numpy as np
|
|
|
|
| 3 |
from tensorflow import keras
|
| 4 |
|
| 5 |
model = keras.models.load_model('my_model')
|
|
@@ -8,5 +8,5 @@ def greet(img):
|
|
| 8 |
img = np.expand_dims(img, axis=0)
|
| 9 |
return np.argmax(model.predict(img)[0])
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
| 1 |
import numpy as np
|
| 2 |
+
import gradio as gr
|
| 3 |
from tensorflow import keras
|
| 4 |
|
| 5 |
model = keras.models.load_model('my_model')
|
|
|
|
| 8 |
img = np.expand_dims(img, axis=0)
|
| 9 |
return np.argmax(model.predict(img)[0])
|
| 10 |
|
| 11 |
+
demo = gr.Interface(fn=greet, inputs="sketchpad", outputs="text")
|
| 12 |
+
demo.launch()
|