Spaces:
Sleeping
Sleeping
commenting out Path workaround
Browse files
app.py
CHANGED
@@ -6,10 +6,10 @@ import pathlib, os
|
|
6 |
classes = ['rock', 'paper', 'scissors'] # c0, c1, c2
|
7 |
|
8 |
def classify_image(img, model):
|
9 |
-
if os.name == 'nt': # workaround for Windows
|
10 |
-
|
11 |
-
if os.name == 'posix': # workaround for Linux
|
12 |
-
|
13 |
|
14 |
learn = load_learner(model)
|
15 |
pred,idx,probs = learn.predict(img)
|
|
|
6 |
classes = ['rock', 'paper', 'scissors'] # c0, c1, c2
|
7 |
|
8 |
def classify_image(img, model):
|
9 |
+
# if os.name == 'nt': # workaround for Windows
|
10 |
+
# pathlib.PosixPath = pathlib.WindowsPath
|
11 |
+
# if os.name == 'posix': # workaround for Linux
|
12 |
+
# pathlib.WindowsPath = pathlib.PosixPath
|
13 |
|
14 |
learn = load_learner(model)
|
15 |
pred,idx,probs = learn.predict(img)
|