Spaces / app.py
msproper's picture
Update app.py
a19183d
import gradio as gr
import numpy as np
from tensorflow import keras
model = keras.models.load_model('my_model')
def predict(img):
img = np.expand_dims(img, axis=0)
return np.argmax(model.predict(img)[0])
demo = gr.Interface(fn=predict, inputs='sketchpad', outputs="text")
demo.launch()