Spaces:
Sleeping
Sleeping
windowspath error fix
Browse files
app.py
CHANGED
@@ -2,6 +2,11 @@ import gradio as gr
|
|
2 |
from fastai.vision.all import *
|
3 |
#import skimage
|
4 |
|
|
|
|
|
|
|
|
|
|
|
5 |
learn = load_learner('export.pkl')
|
6 |
|
7 |
labels = learn.dls.vocab
|
|
|
2 |
from fastai.vision.all import *
|
3 |
#import skimage
|
4 |
|
5 |
+
#Fix for the WindowsPath error
|
6 |
+
import pathlib
|
7 |
+
plt = platform.system()
|
8 |
+
if plt == 'Windows': pathlib.PosixPath = pathlib.WindowsPath
|
9 |
+
|
10 |
learn = load_learner('export.pkl')
|
11 |
|
12 |
labels = learn.dls.vocab
|