Spaces:
Sleeping
Sleeping
Commit
·
d47e854
1
Parent(s):
a210aea
Update app.py
Browse files
app.py
CHANGED
@@ -13,11 +13,10 @@ def predict(img):
|
|
13 |
pred,pred_idx,probs = learn.predict(img)
|
14 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
gr.Interface(fn=predict, inputs=gr.Image(height = 512, width = 512), outputs=gr.Label(num_top_classes=3)).launch(share=True)
|
|
|
13 |
pred,pred_idx,probs = learn.predict(img)
|
14 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
15 |
|
16 |
+
gr.Interface(fn=predict, inputs=gr.Image(height = 512, width = 512), outputs=gr.Label(num_top_classes=3),
|
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.",
|
19 |
+
article="<p style='text-align: center'><a href='https://tmabraham.github.io/blog/gradio_hf_spaces_tutorial' target='_blank'>Blog post</a></p>",
|
20 |
+
examples = ['siamese.jpg'],
|
21 |
+
queue=True
|
22 |
+
).launch(share=True)
|
|