Viet commited on
Commit
36bfe15
1 Parent(s): d8a2a03

fix windowspath issue

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -2,10 +2,13 @@ import gradio as gr
2
  from fastai.vision.all import *
3
 
4
  #fix some issues with Poxixpath
5
- import pathlib
6
- temp = pathlib.PosixPath
7
- pathlib.PosixPath = pathlib.WindowsPath
8
 
 
 
 
9
 
10
  def is_cat(x): return x[0].isupper()
11
 
 
2
  from fastai.vision.all import *
3
 
4
  #fix some issues with Poxixpath
5
+ # import pathlib
6
+ # temp = pathlib.PosixPath
7
+ # pathlib.PosixPath = pathlib.WindowsPath
8
 
9
+ import pathlib
10
+ plt = platform.system()
11
+ if plt == 'Windows': pathlib.PosixPath = pathlib.WindowsPath
12
 
13
  def is_cat(x): return x[0].isupper()
14