kritarth3 commited on
Commit
73fb83a
·
1 Parent(s): 7b045cf

windowspath error fix

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