Spaces:
Runtime error
Runtime error
Commit ·
e7e82d6
1
Parent(s): 7ba6ad7
fix WindowsPath bug
Browse files
app.py
CHANGED
|
@@ -1,6 +1,10 @@
|
|
| 1 |
from fastai.vision.all import *
|
| 2 |
import gradio as gr
|
| 3 |
import skimage
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
learn = load_learner('./model.pkl')
|
| 6 |
examples = [str(path) for path in get_image_files("./images")]
|
|
|
|
| 1 |
from fastai.vision.all import *
|
| 2 |
import gradio as gr
|
| 3 |
import skimage
|
| 4 |
+
import pathlib
|
| 5 |
+
|
| 6 |
+
plt = platform.system()
|
| 7 |
+
if plt == 'Linux': pathlib.WindowsPath = pathlib.PosixPath
|
| 8 |
|
| 9 |
learn = load_learner('./model.pkl')
|
| 10 |
examples = [str(path) for path in get_image_files("./images")]
|