修改:模型路径问题
Browse files
app.py
CHANGED
@@ -1,5 +1,9 @@
|
|
1 |
from fastai.vision.all import *
|
2 |
import gradio as gr
|
|
|
|
|
|
|
|
|
3 |
|
4 |
modelPath = Path('export.pkl')
|
5 |
learn = load_learner(modelPath)
|
|
|
1 |
from fastai.vision.all import *
|
2 |
import gradio as gr
|
3 |
+
import pathlib
|
4 |
+
|
5 |
+
plt = platform.system()
|
6 |
+
if plt == 'Linux': pathlib.WindowsPath = pathlib.PosixPath
|
7 |
|
8 |
modelPath = Path('export.pkl')
|
9 |
learn = load_learner(modelPath)
|