MySpace / app.py
SaiderNN's picture
Update app.py
5624821
raw
history blame contribute delete
298 Bytes
import gradio as gr
import numpy as np
from tensorflow import keras
model = keras.models.load_model("my_new_model")
def greet(img):
img = np.expand_dims(img, axis = 0)
return np.argmax(model.predict(img)[0])
iface = gr.Interface(fn=greet, inputs="sketchpad", outputs="text")
iface.launch()