Update app.py
Browse files
app.py
CHANGED
|
@@ -16,13 +16,13 @@ def predict(img):
|
|
| 16 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 17 |
|
| 18 |
#Example images for demonstration
|
| 19 |
-
|
| 20 |
|
| 21 |
# Create the Gradio interface
|
| 22 |
interface = gr.Interface(
|
| 23 |
fn=predict,
|
| 24 |
inputs=gr.Image(),
|
| 25 |
-
outputs=gr.Label(num_top_classes=3)
|
| 26 |
)
|
| 27 |
|
| 28 |
# Enable the queue to handle POST requests
|
|
|
|
| 16 |
return {labels[i]: float(probs[i]) for i in range(len(labels))}
|
| 17 |
|
| 18 |
#Example images for demonstration
|
| 19 |
+
examples = ['Image1.jpg, Image3.jpg, image5.jpg, Image5.webp']
|
| 20 |
|
| 21 |
# Create the Gradio interface
|
| 22 |
interface = gr.Interface(
|
| 23 |
fn=predict,
|
| 24 |
inputs=gr.Image(),
|
| 25 |
+
outputs=gr.Label(examples,num_top_classes=3)
|
| 26 |
)
|
| 27 |
|
| 28 |
# Enable the queue to handle POST requests
|