ram-ahmed commited on
Commit
8d2c853
1 Parent(s): a2753d3

updated app.py file

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -1,7 +1,7 @@
1
  # AUTOGENERATED! DO NOT EDIT! File to edit: app.ipynb.
2
 
3
  # %% auto 0
4
- __all__ = ['learn', 'big_cats', 'image', 'classify_image']
5
 
6
  # %% app.ipynb 2
7
  from fastai.vision.all import *
@@ -18,4 +18,9 @@ def classify_image(img):
18
  return dict(zip(big_cats, map(float, probs)))
19
 
20
  # %% app.ipynb 8
21
- image = gr.inputs_Image
 
 
 
 
 
 
1
  # AUTOGENERATED! DO NOT EDIT! File to edit: app.ipynb.
2
 
3
  # %% auto 0
4
+ __all__ = ['learn', 'big_cats', 'image', 'label', 'examples', 'intf', 'classify_image']
5
 
6
  # %% app.ipynb 2
7
  from fastai.vision.all import *
 
18
  return dict(zip(big_cats, map(float, probs)))
19
 
20
  # %% app.ipynb 8
21
+ image = gr.inputs.Image(shape=(192,192))
22
+ label = gr.outputs.Label()
23
+ examples = ['leopard.jpeg']
24
+
25
+ intf = gr.Interface(fn=classify_image, inputs=image, outputs = label, examples=examples)
26
+ intf.launch(inline=False)