xuyaxiong commited on
Commit
89be3bf
1 Parent(s): 7a67cf2

修改:模型路径问题

Browse files
Files changed (1) hide show
  1. app.py +4 -0
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)