Posix error again
Browse files
app.py
CHANGED
@@ -13,12 +13,15 @@ from fastai.vision.all import *
|
|
13 |
import skimage
|
14 |
import pathlib
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
|
|
|
|
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):
|