ptoro commited on
Commit
fbd34ea
·
1 Parent(s): 9a2fa4f

update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -4,23 +4,20 @@
4
  __all__ = ['learn', 'labels', 'image', 'label', 'examples', 'intf', 'classify_image']
5
 
6
  # %% app.ipynb 1
7
- !pip install -Uqq fastai
8
-
9
- # %% app.ipynb 2
10
  from fastai.vision.all import *
11
  import gradio as gr
12
 
13
- # %% app.ipynb 4
14
  learn = load_learner('eh_native_plants.pkl')
15
 
16
- # %% app.ipynb 7
17
  labels = learn.dls.vocab
18
 
19
  def classify_image(img):
20
  pred,pred_idx,probs = learn.predict(img)
21
  return dict(zip(labels, map(float, probs)))
22
 
23
- # %% app.ipynb 9
24
  image = gr.Image(shape=(192,192))
25
  label = gr.Label()
26
  examples = ['ind_grass.jpg', 'reed.jpg']
 
4
  __all__ = ['learn', 'labels', 'image', 'label', 'examples', 'intf', 'classify_image']
5
 
6
  # %% app.ipynb 1
 
 
 
7
  from fastai.vision.all import *
8
  import gradio as gr
9
 
10
+ # %% app.ipynb 3
11
  learn = load_learner('eh_native_plants.pkl')
12
 
13
+ # %% app.ipynb 6
14
  labels = learn.dls.vocab
15
 
16
  def classify_image(img):
17
  pred,pred_idx,probs = learn.predict(img)
18
  return dict(zip(labels, map(float, probs)))
19
 
20
+ # %% app.ipynb 8
21
  image = gr.Image(shape=(192,192))
22
  label = gr.Label()
23
  examples = ['ind_grass.jpg', 'reed.jpg']