eivindthrondsen commited on
Commit
b01672f
1 Parent(s): df1fc91

Update app.py

Browse files

Added function is_cat

Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -10,6 +10,8 @@ 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
  title = "Pet Breed Classifier"
14
  description = "A pet breed classifier trained on the Oxford Pets dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
15
  article="<p style='text-align: center'><a href='https://tmabraham.github.io/blog/gradio_hf_spaces_tutorial' target='_blank'>Blog post</a></p>"
 
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): return x[0].isupper()
14
+
15
  title = "Pet Breed Classifier"
16
  description = "A pet breed classifier trained on the Oxford Pets dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
17
  article="<p style='text-align: center'><a href='https://tmabraham.github.io/blog/gradio_hf_spaces_tutorial' target='_blank'>Blog post</a></p>"