teamtom commited on
Commit
bc89923
1 Parent(s): f3e73e7

adding workaround for PosixPath

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -5,6 +5,8 @@ import pathlib, os
5
  categories = ['daisy', 'dandelion', 'rose', 'sunflower', 'tulip']
6
 
7
  def classify_image(img):
 
 
8
 
9
  learn = load_learner('flowers.pkl')
10
  pred,idx,probs = learn.predict(img)
 
5
  categories = ['daisy', 'dandelion', 'rose', 'sunflower', 'tulip']
6
 
7
  def classify_image(img):
8
+ if os.name == 'posix': # workaround for Linux
9
+ pathlib.WindowsPath = pathlib.PosixPath
10
 
11
  learn = load_learner('flowers.pkl')
12
  pred,idx,probs = learn.predict(img)