Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -64,11 +64,10 @@ def run_inference(image, device, valid_ds):
|
|
| 64 |
# Create a Gradio interface
|
| 65 |
iface = gr.Interface(
|
| 66 |
fn=lambda image: run_inference(image, device, valid_ds),
|
| 67 |
-
inputs=gr.
|
| 68 |
outputs="text", # Output is text (predicted class)
|
| 69 |
title="Image Classification",
|
| 70 |
description="Upload an image to get the predicted class using the ViT model."
|
| 71 |
)
|
| 72 |
-
|
| 73 |
# Launch the Gradio app
|
| 74 |
iface.launch()
|
|
|
|
| 64 |
# Create a Gradio interface
|
| 65 |
iface = gr.Interface(
|
| 66 |
fn=lambda image: run_inference(image, device, valid_ds),
|
| 67 |
+
inputs=gr.Image(type="numpy"), # Updated to use gr.Image
|
| 68 |
outputs="text", # Output is text (predicted class)
|
| 69 |
title="Image Classification",
|
| 70 |
description="Upload an image to get the predicted class using the ViT model."
|
| 71 |
)
|
|
|
|
| 72 |
# Launch the Gradio app
|
| 73 |
iface.launch()
|