Dagmar commited on
Commit
b8591ae
1 Parent(s): 1f3af60

added labels

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -4,6 +4,13 @@ import gradio as gr
4
 
5
  def is_cat(x): return x[0].isupper()
6
 
 
 
 
 
 
 
 
7
  learn = load_learner('model.pkl')
8
 
9
  labels = learn.dls.vocab
 
4
 
5
  def is_cat(x): return x[0].isupper()
6
 
7
+ path = untar_data(URLs.PETS)/'images'
8
+
9
+ dls = ImageDataLoaders.from_name_func('.',
10
+ get_image_files(path), valid_pct=0.2, seed=42,
11
+ label_func=is_cat,
12
+ item_tfms=Resize(192))
13
+
14
  learn = load_learner('model.pkl')
15
 
16
  labels = learn.dls.vocab