kaesb commited on
Commit
6fba747
·
1 Parent(s): 6fd0c61

Added relative path

Browse files
Files changed (2) hide show
  1. app.py +4 -1
  2. requirements.txt +1 -2
app.py CHANGED
@@ -1,7 +1,10 @@
1
  from fastai.vision.all import *
2
  import gradio as gr
 
3
 
4
- learn = load_learner('cat_dog_model.pkl')
 
 
5
  labels = learn.dls.vocab
6
 
7
  def predict(img):
 
1
  from fastai.vision.all import *
2
  import gradio as gr
3
+ from pathlib import Path
4
 
5
+ learner_dir = Path('cat_dog_model.pkl')
6
+
7
+ learn = load_learner(learner_dir)
8
  labels = learn.dls.vocab
9
 
10
  def predict(img):
requirements.txt CHANGED
@@ -1,5 +1,4 @@
1
  fastai
2
  torch
3
  gradio
4
- numpy
5
- pandas
 
1
  fastai
2
  torch
3
  gradio
4
+ pathlib