Spaces:
Sleeping
Sleeping
Commit ·
a42baeb
1
Parent(s): f7ee4e0
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,11 +12,5 @@ def predict(img):
|
|
| 12 |
pred,pred_idx,probs = learn.predict(img)
|
| 13 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 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>"
|
| 18 |
-
examples = ['siamese.jpg']
|
| 19 |
-
interpretation='default'
|
| 20 |
-
enable_queue=True
|
| 21 |
|
| 22 |
gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=3),title=title,description=description,article=article,examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch()
|
|
|
|
| 12 |
pred,pred_idx,probs = learn.predict(img)
|
| 13 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
gr.Interface(fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=3),title=title,description=description,article=article,examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch()
|