lexty commited on
Commit
8c62a76
1 Parent(s): 24fb9ee

fix: read categories from model

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
2
  from fastai.vision.all import *
3
 
4
  learn = load_learner('model.pkl')
5
- categories = ('Cat', 'Dog')
6
 
7
  def classify_image(img):
8
  pred, idx, probs = learn.predict(img)
 
2
  from fastai.vision.all import *
3
 
4
  learn = load_learner('model.pkl')
5
+ categories = learn.dls.vocab
6
 
7
  def classify_image(img):
8
  pred, idx, probs = learn.predict(img)