Spaces:
Sleeping
Sleeping
Commit
·
b01672f
1
Parent(s):
df1fc91
Update app.py
Browse filesAdded function is_cat
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>"
|