Ridealist commited on
Commit
81d5c96
·
1 Parent(s): df27a80

Fix image shape to pil format

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -14,8 +14,7 @@ def predict(img):
14
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
15
 
16
 
17
- iface = gr.Interface(fn=predict,
18
- inputs=gr.Image(shape=(512, 512)),
19
  outputs=gr.Label(num_top_classes=3),
20
- interpretation='default')
21
- iface.launch()
 
14
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
15
 
16
 
17
+ gr.Interface(fn=predict,
18
+ inputs=gr.Image(type="pil"),
19
  outputs=gr.Label(num_top_classes=3),
20
+ interpretation='default').launch()