piyushgrover commited on
Commit
c44e5c6
·
verified ·
1 Parent(s): e156995

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -54,8 +54,8 @@ def predict_top5(image):
54
  # Create the Gradio interface
55
  interface = gr.Interface(
56
  fn=predict_top5,
57
- inputs=gr.inputs.Image(type="pil"),
58
- outputs=gr.outputs.Label(num_top_classes=5),
59
  title="ResNet50 Image Classification",
60
  description="Upload an image to get the top-5 class predictions from the ResNet50 model trained on ImageNet 1k.",
61
  )
 
54
  # Create the Gradio interface
55
  interface = gr.Interface(
56
  fn=predict_top5,
57
+ inputs=gr.Image(type="pil"), # Updated syntax for image input
58
+ outputs=gr.Label(num_top_classes=5), # Updated syntax for label output
59
  title="ResNet50 Image Classification",
60
  description="Upload an image to get the top-5 class predictions from the ResNet50 model trained on ImageNet 1k.",
61
  )