File size: 625 Bytes
7edb3e4
999fa11
7edb3e4
5f2b2ff
7edb3e4
999fa11
 
 
0c036c4
 
 
999fa11
e634e4c
7edb3e4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import gradio as gr
import tensorflow as tf

#model = tf.keras.models.load_model("mnist_checker/model/saved_model.pb")

def mnist_classifier(img):
    #img = tf.image.resize(img, [28, 28])
    #img = tf.cast(img, tf.float32)
    print("Background: " + len(img['background']) + type(img['background']))
    print("Composite: " + len(img['composite']) + type(img['composite']))
    print("Layers: " + len(img['layers']) + type(img['layers']))

demo = gr.Interface(fn=mnist_classifier, inputs="sketchpad", outputs="text", title="MNIST Checker", description="Draw a number 0-9 to see if the model can classify it.")
demo.launch()