zhongdj commited on
Commit
3a9752a
·
1 Parent(s): 462c718

try to fix syntax issue

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,9 +8,9 @@ from fastai.vision.widgets import *
8
  f = Path() / 'bamboo_or_butterfly.pkl'
9
  learn_inf = load_learner(f)
10
 
11
- def predict(img)
12
  pred, pred_idx, probs = learn_inf.predict(img.to_thumb(224))
13
- f'Prediction: {pred}; Probability:{probs[pred_idx]:.04f}'
14
 
15
  iface = gr.Interface(fn=predict, inputs="image", outputs="text")
16
  iface.launch()
 
8
  f = Path() / 'bamboo_or_butterfly.pkl'
9
  learn_inf = load_learner(f)
10
 
11
+ def predict(img):
12
  pred, pred_idx, probs = learn_inf.predict(img.to_thumb(224))
13
+ return f'Prediction: {pred}; Probability:{probs[pred_idx]:.04f}'
14
 
15
  iface = gr.Interface(fn=predict, inputs="image", outputs="text")
16
  iface.launch()