RyanDA commited on
Commit
37ac1c6
·
1 Parent(s): d7254b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,5 +1,7 @@
1
  import gradio as gr
2
  import numpy as np
 
 
3
  from keras.models import load_model
4
 
5
  model = load_model("QuickDraw_model.h5")
@@ -10,5 +12,5 @@ def QuickDraw(arr):
10
  labels = ["Apple","Cell Phone","Chair","Hot Air Balloon","Jail","Ladder","Line","Spider","Windmill","Zigzag"]
11
  return {labels[idx]: float(val) for idx, val in enumerate(output[0])}
12
 
13
- iface = gr.Interface(fn=QuickDraw, inputs="sketchpad", outputs="label")
14
  iface.launch()
 
1
  import gradio as gr
2
  import numpy as np
3
+ from PIL import Image
4
+ from matplotlib import cm
5
  from keras.models import load_model
6
 
7
  model = load_model("QuickDraw_model.h5")
 
12
  labels = ["Apple","Cell Phone","Chair","Hot Air Balloon","Jail","Ladder","Line","Spider","Windmill","Zigzag"]
13
  return {labels[idx]: float(val) for idx, val in enumerate(output[0])}
14
 
15
+ iface = gr.Interface(fn=QuickDraw, inputs=gr.Sketchpad().style(height=400, width=400), outputs="label")
16
  iface.launch()