eivindthrondsen commited on
Commit
8548f23
1 Parent(s): 25eb78b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -2,6 +2,9 @@ import gradio as gr
2
  from fastai.vision.all import *
3
  import skimage
4
 
 
 
 
5
  learn = load_learner('model.pkl')
6
 
7
  labels = learn.dls.vocab
@@ -10,8 +13,6 @@ def predict(img):
10
  pred,pred_idx,probs = learn.predict(img)
11
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
12
 
13
- def is_cat(x):
14
- return x[0].isupper()
15
 
16
  title = "Pet Breed Classifier"
17
  description = "A pet breed classifier trained on the Oxford Pets dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
 
2
  from fastai.vision.all import *
3
  import skimage
4
 
5
+ def is_cat(x):
6
+ return x[0].isupper()
7
+
8
  learn = load_learner('model.pkl')
9
 
10
  labels = learn.dls.vocab
 
13
  pred,pred_idx,probs = learn.predict(img)
14
  return {labels[i]: float(probs[i]) for i in range(len(labels))}
15
 
 
 
16
 
17
  title = "Pet Breed Classifier"
18
  description = "A pet breed classifier trained on the Oxford Pets dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."