kellyshreeve commited on
Commit
d8ab34c
·
verified ·
1 Parent(s): 3a120bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -7,15 +7,12 @@ neural_net = load_learner('trained-NN.pkl')
7
  labels = neural_net.dls.vocab
8
 
9
  def predict(img):
10
- # img = PILImage.create(img)
11
  category, idx, probs = neural_net.predict(img)
12
  return dict(zip(labels, map(float, probs)))
13
- # return {'cat': 0.3, 'dog': 0.7}
14
- # return img.rotate(45)
15
 
16
  title = 'Natural Landscape Classifier'
17
 
18
- examples = ['farm.png']
19
 
20
  iface = gr.Interface(fn=predict,
21
  inputs=gr.Image(type='pil'),
 
7
  labels = neural_net.dls.vocab
8
 
9
  def predict(img):
 
10
  category, idx, probs = neural_net.predict(img)
11
  return dict(zip(labels, map(float, probs)))
 
 
12
 
13
  title = 'Natural Landscape Classifier'
14
 
15
+ examples = 'farm.png'
16
 
17
  iface = gr.Interface(fn=predict,
18
  inputs=gr.Image(type='pil'),