George Sergia commited on
Commit
a65ccd0
·
1 Parent(s): 2b32e25

Replace load_learner with hugging face functions

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,8 +1,8 @@
1
  from fastai.vision.all import *
2
- from fastai.learner import load_learner
3
  import gradio as gr
4
 
5
- learner = load_learner("bears.pkl")
6
 
7
  categories = ("grizzly", "black", "white", "brown", "teddy")
8
  def classify_bear(img):
 
1
  from fastai.vision.all import *
2
+ from huggingface_hub import push_to_hub_fastai, from_pretrained_fastai
3
  import gradio as gr
4
 
5
+ learner = from_pretrained_fastai("bears.pkl")
6
 
7
  categories = ("grizzly", "black", "white", "brown", "teddy")
8
  def classify_bear(img):