mirsaid5455 commited on
Commit
b2c713d
1 Parent(s): 1c951b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -4,9 +4,13 @@ from PIL import Image
4
  import numpy as np
5
  import pathlib
6
 
 
 
 
 
7
  # Temporary fix for pathlib.PosixPath on Windows
8
- temp = pathlib.PosixPath
9
- pathlib.PosixPath = pathlib.WindowsPath
10
 
11
  # Load the Fastai Learner model
12
  learn = load_learner('model.pkl')
 
4
  import numpy as np
5
  import pathlib
6
 
7
+ import pathlib
8
+ plt = platform.system()
9
+ if plt == 'Linux': pathlib.PosixPath = pathlib.WindowsPath
10
+
11
  # Temporary fix for pathlib.PosixPath on Windows
12
+ # temp = pathlib.PosixPath
13
+ # pathlib.PosixPath = pathlib.WindowsPath
14
 
15
  # Load the Fastai Learner model
16
  learn = load_learner('model.pkl')