Yahya Ben commited on
Commit
5cca245
·
1 Parent(s): 640b343
Files changed (2) hide show
  1. app.py +4 -4
  2. requirements.txt +1 -1
app.py CHANGED
@@ -1,11 +1,11 @@
1
  from fastai.vision.all import *
2
  import gradio as gr
3
 
4
- import pathlib ### use this trick https://stackoverflow.com/questions/57286486/i-cant-load-my-model-because-i-cant-put-a-posixpath
5
- temp = pathlib.PosixPath
6
- pathlib.PosixPath = pathlib.WindowsPath
7
  learn = load_learner('model.pkl')
8
- pathlib.PosixPath = temp
9
 
10
  categories = ('Morocco', 'Usa')
11
 
 
1
  from fastai.vision.all import *
2
  import gradio as gr
3
 
4
+ # import pathlib ### use this trick https://stackoverflow.com/questions/57286486/i-cant-load-my-model-because-i-cant-put-a-posixpath
5
+ # temp = pathlib.PosixPath
6
+ # pathlib.PosixPath = pathlib.WindowsPath
7
  learn = load_learner('model.pkl')
8
+ # pathlib.PosixPath = temp
9
 
10
  categories = ('Morocco', 'Usa')
11
 
requirements.txt CHANGED
@@ -1,3 +1,3 @@
1
  fastai
2
- gradio
3
  pathlib
 
1
  fastai
2
+ # gradio
3
  pathlib