CoolFace
Apppublic

CyberTea/digits

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
app.py13 linesDownload Raw Back to root
1import gradio as gr2import numpy as np3from tensorflow import keras4 5model = keras.models.load_model('my_model')6 7def predict(img):8  img = np.expand_dims(img, axis=0)9  return np.argmax(model.predict(img)[0])10 11demo = gr.Interface(fn=predict, inputs='sketchpad', outputs="text")12 13demo.launch()