File size: 293 Bytes
83bfe96
 
a19183d
83bfe96
a19183d
83bfe96
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
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()