Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -54,8 +54,8 @@ def predict_top5(image):
|
|
54 |
# Create the Gradio interface
|
55 |
interface = gr.Interface(
|
56 |
fn=predict_top5,
|
57 |
-
inputs=gr.
|
58 |
-
outputs=gr.
|
59 |
title="ResNet50 Image Classification",
|
60 |
description="Upload an image to get the top-5 class predictions from the ResNet50 model trained on ImageNet 1k.",
|
61 |
)
|
|
|
54 |
# Create the Gradio interface
|
55 |
interface = gr.Interface(
|
56 |
fn=predict_top5,
|
57 |
+
inputs=gr.Image(type="pil"), # Updated syntax for image input
|
58 |
+
outputs=gr.Label(num_top_classes=5), # Updated syntax for label output
|
59 |
title="ResNet50 Image Classification",
|
60 |
description="Upload an image to get the top-5 class predictions from the ResNet50 model trained on ImageNet 1k.",
|
61 |
)
|