Spaces:
Sleeping
Sleeping
YonaniCodes commited on
Commit ·
b3e1e17
1
Parent(s): a91136c
app.py
CHANGED
|
@@ -70,13 +70,13 @@ def predict_breed(image):
|
|
| 70 |
# Draw the actual text
|
| 71 |
draw.text(text_position, text, font=font, fill=text_color)
|
| 72 |
|
| 73 |
-
return
|
| 74 |
|
| 75 |
# Create Gradio interface
|
| 76 |
interface = gr.Interface(
|
| 77 |
fn=predict_breed,
|
| 78 |
inputs=gr.Image(type="pil"),
|
| 79 |
-
outputs=
|
| 80 |
title="Dog Breed Identifier 🐶",
|
| 81 |
description="Upload a dog image and the model will predict the breed along with confidence!"
|
| 82 |
)
|
|
|
|
| 70 |
# Draw the actual text
|
| 71 |
draw.text(text_position, text, font=font, fill=text_color)
|
| 72 |
|
| 73 |
+
return f"{predicted_class} ({confidence:.2f}%)"
|
| 74 |
|
| 75 |
# Create Gradio interface
|
| 76 |
interface = gr.Interface(
|
| 77 |
fn=predict_breed,
|
| 78 |
inputs=gr.Image(type="pil"),
|
| 79 |
+
outputs=gr.Text(),
|
| 80 |
title="Dog Breed Identifier 🐶",
|
| 81 |
description="Upload a dog image and the model will predict the breed along with confidence!"
|
| 82 |
)
|