limitedonly41 commited on
Commit
6fbda7c
·
verified ·
1 Parent(s): 933bfd7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
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.inputs.Image(type="numpy"), # Input is an 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
-
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()