emadahmed97 commited on
Commit
c11120e
·
1 Parent(s): 5ff50b3

use model pretrained

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