dmitryakonovalov commited on
Commit
f4ccf2f
1 Parent(s): 96a2ff3

Update app.py

Browse files

# version error fix: https://forums.fast.ai/t/error-when-pushing-to-hugging-face-spaces/111540
# I also replaced:
#image = gr.inputs.Image(shape=(192, 192))
#label = gr.outputs.Label()
#with:
#image = gr.Image()
#label = gr.Label()
# without needing to down gradio

Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -18,8 +18,19 @@ def classify_image(img):
18
  return dict(zip(categories, map(float,probs)))
19
 
20
  # Cell
21
- image = gr.inputs.Image(shape=(192, 192))
22
- label = gr.outputs.Label()
 
 
 
 
 
 
 
 
 
 
 
23
  examples = ['basset.jpg']
24
 
25
  # Cell
 
18
  return dict(zip(categories, map(float,probs)))
19
 
20
  # Cell
21
+ # version error fix: https://forums.fast.ai/t/error-when-pushing-to-hugging-face-spaces/111540
22
+ # I also replaced:
23
+ #image = gr.inputs.Image(shape=(192, 192))
24
+ #label = gr.outputs.Label()
25
+ #with:
26
+ #image = gr.Image()
27
+ #label = gr.Label()
28
+ # without needing to down gradio
29
+
30
+ #image = gr.inputs.Image(shape=(192, 192)) # OLD
31
+ image = gr.Image(shape=(192, 192))
32
+ # label = gr.outputs.Label() # OLD
33
+ label = gr.Label()
34
  examples = ['basset.jpg']
35
 
36
  # Cell