c-walls commited on
Commit
0c036c4
·
1 Parent(s): cff7c7c

print gradio datatypes

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,9 +6,9 @@ import tensorflow as tf
6
  def mnist_classifier(img):
7
  #img = tf.image.resize(img, [28, 28])
8
  #img = tf.cast(img, tf.float32)
9
- print(img['background'])
10
- print(img['composite'])
11
- return "returned: " + img['layers']
12
 
13
  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.")
14
  demo.launch()
 
6
  def mnist_classifier(img):
7
  #img = tf.image.resize(img, [28, 28])
8
  #img = tf.cast(img, tf.float32)
9
+ print("Background: " + len(img['background']) + type(img['background']))
10
+ print("Composite: " + len(img['composite']) + type(img['composite']))
11
+ print("Layers: " + len(img['layers']) + type(img['layers']))
12
 
13
  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.")
14
  demo.launch()