pka007 commited on
Commit
94135ec
·
verified ·
1 Parent(s): 0c26f33

updated app file and removed pickle

Browse files
Files changed (3) hide show
  1. app.py +2 -1
  2. flowersclassifier.pkl +0 -3
  3. requirements.txt +2 -1
app.py CHANGED
@@ -1,8 +1,9 @@
1
  import gradio as gr
2
  from fastai.vision.all import *
 
3
 
4
  # loading the model
5
- learn = load_learner('flowersclassifier.pkl')
6
  labels = learn.dls.vocab
7
  def predict(img):
8
  img = PILImage.create(img)
 
1
  import gradio as gr
2
  from fastai.vision.all import *
3
+ from huggingface_hub import from_pretrained_fastai
4
 
5
  # loading the model
6
+ learn = from_pretrained_fastai("pka007/flowerclassifier_model")
7
  labels = learn.dls.vocab
8
  def predict(img):
9
  img = PILImage.create(img)
flowersclassifier.pkl DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:ad91a31a33b19439553855abe982710a1fac36cca0f2a40f577fddd0baac1096
3
- size 46985022
 
 
 
 
requirements.txt CHANGED
@@ -1 +1,2 @@
1
- fastai
 
 
1
+ fastai
2
+ huggingface_hub["fastai"]