iamomtiwari commited on
Commit
2af3b99
·
verified ·
1 Parent(s): 661c141

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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.inputs.Image(type="pil", label="Upload Image"),
31
- outputs="text",
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