sguna commited on
Commit
89baa07
·
verified ·
1 Parent(s): 6d897fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -76,7 +76,8 @@ def classify_image(image):
76
  iface = gr.Interface(
77
  fn=classify_image,
78
  inputs=gr.Image(type="pil"),
79
- outputs=gr.Textbox(label="Output (Debug Mode)"), # Use Textbox to display errors if any occur
 
80
  title="Content Safety Classification",
81
  description="Upload an image to classify it as 'safe' or 'unsafe' with corresponding probabilities.",
82
  )
 
76
  iface = gr.Interface(
77
  fn=classify_image,
78
  inputs=gr.Image(type="pil"),
79
+ #outputs=gr.Textbox(label="Output (Debug Mode)"), # Use Textbox to display errors if any occur
80
+ outputs=gr.Label(num_top_classes=2),
81
  title="Content Safety Classification",
82
  description="Upload an image to classify it as 'safe' or 'unsafe' with corresponding probabilities.",
83
  )