jamesd22 commited on
Commit
a15a490
1 Parent(s): de3dac0

Load the model before get the labels from the model

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,8 +2,9 @@ import gradio as gr
2
  from fastai.vision.all import *
3
  import skimage
4
 
5
- labels = learn.dls.vocab
6
  learn = load_learner('export.pkl')
 
 
7
  def predict(img):
8
  img = PILImage.create(img)
9
  pred, pred_idx, probs = learn.predict(img)
 
2
  from fastai.vision.all import *
3
  import skimage
4
 
 
5
  learn = load_learner('export.pkl')
6
+ labels = learn.dls.vocab
7
+
8
  def predict(img):
9
  img = PILImage.create(img)
10
  pred, pred_idx, probs = learn.predict(img)