mpfoley73 commited on
Commit
b1fc623
·
1 Parent(s): f50cad2

Posix error again

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -13,12 +13,15 @@ from fastai.vision.all import *
13
  import skimage
14
  import pathlib
15
 
16
- posix_backup = pathlib.PosixPath
17
- try:
18
- pathlib.PosixPath = pathlib.WindowsPath
19
- learn = load_learner('dog_breed_classifier.pkl')
20
- finally:
21
- pathlib.PosixPath = posix_backup
 
 
 
22
 
23
  labels = learn.dls.vocab
24
  def predict(img):
 
13
  import skimage
14
  import pathlib
15
 
16
+ # Uncomment this for local (Windows) development.
17
+ # Reference: https://stackoverflow.com/questions/57286486/i-cant-load-my-model-because-i-cant-put-a-posixpath
18
+ #
19
+ # posix_backup = pathlib.PosixPath
20
+ # try:
21
+ # pathlib.PosixPath = pathlib.WindowsPath
22
+ # learn = load_learner('dog_breed_classifier.pkl')
23
+ # finally:
24
+ # pathlib.PosixPath = posix_backup
25
 
26
  labels = learn.dls.vocab
27
  def predict(img):