Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ def predict(image):
|
|
8 |
|
9 |
title = "Image Classifier"
|
10 |
description = "A demo that recognizes and classifies images using the model from Hugging Face's 'google/vit-base-patch16-224'."
|
11 |
-
input_component = gr.
|
12 |
-
output_component = gr.
|
13 |
|
14 |
-
gr.Interface(fn=predict, inputs=input_component, outputs=output_component, title=title, description=description).launch()
|
|
|
8 |
|
9 |
title = "Image Classifier"
|
10 |
description = "A demo that recognizes and classifies images using the model from Hugging Face's 'google/vit-base-patch16-224'."
|
11 |
+
input_component = gr.Image(type="pil", label="Upload an image here")
|
12 |
+
output_component = gr.Label(num_top_classes=3)
|
13 |
|
14 |
+
gr.Interface(fn=predict, inputs=input_component, outputs=output_component, title=title, description=description).launch()
|