segadeds commited on
Commit
7504c67
·
verified ·
1 Parent(s): 9bc7a40

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -12,12 +12,13 @@ categories = (['calling', 'clapping', 'cycling', 'dancing', 'drinking', 'eating'
12
 
13
 
14
  def classify_image(img):
 
15
  pred,idx,probs = learn.predict(img)
16
  return dict(zip(categories, map(float,probs)))
17
 
18
 
19
 
20
- image = gr.Image(shape=(192,192))
21
  label = gr.Label()
22
  examples = ['laughing.jpg', 'dancing.jpg', 'drinking.jpg']
23
 
 
12
 
13
 
14
  def classify_image(img):
15
+ img = PILImage.create(img).resize((192, 192))
16
  pred,idx,probs = learn.predict(img)
17
  return dict(zip(categories, map(float,probs)))
18
 
19
 
20
 
21
+ image = gr.Image(type='pil')
22
  label = gr.Label()
23
  examples = ['laughing.jpg', 'dancing.jpg', 'drinking.jpg']
24