RyanDA's picture
Update app.py
b95d743
raw
history blame contribute delete
338 Bytes
import gradio as gr
import numpy as np
from keras.models import load_model
model = load_model("MNIST_model.h5")
def MNIST(arr):
arr = arr.reshape((1,28,28,1))
output = model(arr)
return {idx: float(val) for idx, val in enumerate(output[0])}
iface = gr.Interface(fn=MNIST, inputs="sketchpad", outputs="label")
iface.launch()