amitkayal commited on
Commit
f690810
·
1 Parent(s): df820df

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -52,16 +52,16 @@ demo = gr.Interface(
52
  # examples = examples,
53
  fn=None, # We'll add the function later after defining all functions
54
  inputs=[
55
- gr.InterfaceChoice(["Yes", "No"], label="View GradCAM images?"),
56
- gr.InterfaceNumber(label="Number of GradCAM images to view", default=5, min=1, max=10),
57
- gr.InterfaceText(label="Layer name for GradCAM visualization", default="layer4", lines=1),
58
- gr.InterfaceSlider(label="Opacity", min=0.1, max=1.0, default=0.5, step=0.1),
59
- gr.InterfaceChoice(["Yes", "No"], label="View misclassified images?"),
60
- gr.InterfaceNumber(label="Number of misclassified images to view", default=5, min=1, max=10),
61
- gr.InterfaceChoice(["Upload New Images", "Example Images"], label="Select images source"),
62
- gr.InterfaceImage("file" if "Interface" in gr.__file__ else "image", label="Uploaded image" if "Interface" in gr.__file__ else "Image"),
63
- gr.InterfaceButton("Submit", label="View Images")
64
- ],
65
  outputs = [gr.Label(num_top_classes=3), gr.Image(shape=(32, 32), label="Output").style(width=128, height=128)],
66
  live=True
67
  )
 
52
  # examples = examples,
53
  fn=None, # We'll add the function later after defining all functions
54
  inputs=[
55
+ gr.inputs.Radio(["Yes", "No"], label="View GradCAM images?"),
56
+ gr.inputs.Number(label="Number of GradCAM images to view", default=5, min=1, max=10),
57
+ gr.inputs.Textbox(label="Layer name for GradCAM visualization", default="layer4", lines=1),
58
+ gr.inputs.Slider(minimum=0.1, maximum=1.0, step=0.1, default=0.5, label="Opacity"),
59
+ gr.inputs.Radio(["Yes", "No"], label="View misclassified images?"),
60
+ gr.inputs.Number(label="Number of misclassified images to view", default=5, min=1, max=10),
61
+ gr.inputs.Radio(["Upload New Images", "Example Images"], label="Select images source"),
62
+ gr.inputs.Image(label="Uploaded image" if "Interface" in gr.__file__ else "Image"),
63
+ gr.inputs.Button(label="Submit", type="boolean")
64
+ ],
65
  outputs = [gr.Label(num_top_classes=3), gr.Image(shape=(32, 32), label="Output").style(width=128, height=128)],
66
  live=True
67
  )