Thumas commited on
Commit
07dc494
·
1 Parent(s): 64d9039

new update

Browse files
Files changed (2) hide show
  1. app.py +8 -3
  2. gitignore.txt +4 -0
app.py CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  # Cell
2
  from fastai.vision.all import *
3
  import gradio as gr
@@ -15,8 +19,9 @@ def classify_image(img):
15
  return dict(zip(categories, map(float,probs)))
16
 
17
  # Cell
18
- image = gr.Image(shape=(192, 192))
19
- label = gr.Label()
20
  examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
21
 
22
- intf = gr.Interface(fn=classify_image, inputs="image", outputs="label", examples=examples)
 
 
1
+ # AUTOGENERATED! DO NOT EDIT! File to edit: . (unless otherwise specified).
2
+
3
+ __all__ = ['is_cat', 'learn', 'classify_image', 'categories', 'image', 'label', 'examples', 'intf']
4
+
5
  # Cell
6
  from fastai.vision.all import *
7
  import gradio as gr
 
19
  return dict(zip(categories, map(float,probs)))
20
 
21
  # Cell
22
+ image = gr.inputs.Image(shape=(192, 192))
23
+ label = gr.outputs.Label()
24
  examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
25
 
26
+ intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
27
+ intf.launch(inline=False)
gitignore.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ .ipynb_checkpoints/
2
+ *.bak
3
+ *.swp
4
+