Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,10 +25,10 @@ def predict(image):
|
|
25 |
|
26 |
return f"Predicted class: {predicted_class_label}"
|
27 |
|
28 |
-
# Create Gradio Interface
|
29 |
interface = gr.Interface(fn=predict,
|
30 |
-
inputs=gr.
|
31 |
-
outputs=
|
32 |
title="ViT Image Classification (ImageNet)",
|
33 |
description="Upload an image to classify it into one of the 1000 ImageNet classes.")
|
34 |
|
|
|
25 |
|
26 |
return f"Predicted class: {predicted_class_label}"
|
27 |
|
28 |
+
# Create Gradio Interface (Note the change here: `gr.Image` and `gr.Text`)
|
29 |
interface = gr.Interface(fn=predict,
|
30 |
+
inputs=gr.Image(type="pil", label="Upload Image"),
|
31 |
+
outputs=gr.Text(),
|
32 |
title="ViT Image Classification (ImageNet)",
|
33 |
description="Upload an image to classify it into one of the 1000 ImageNet classes.")
|
34 |
|