andromeda01111 commited on
Commit
5cc716f
Β·
verified Β·
1 Parent(s): 9e95ef5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -105,6 +105,17 @@ with gr.Blocks() as demo:
105
 
106
  image_input = gr.Image(type="pil", label="πŸ“· Upload Image (for ViT)", visible=True)
107
 
 
 
 
 
 
 
 
 
 
 
 
108
  feature_inputs = [gr.Number(label=feature) for feature in feature_names]
109
 
110
  # Organizing feature inputs into rows of 3 columns
 
105
 
106
  image_input = gr.Image(type="pil", label="πŸ“· Upload Image (for ViT)", visible=True)
107
 
108
+ example_image = {"πŸ”΅ Benign Example Image": "images/benign (1)_aug_0.png",
109
+ "πŸ”΄ Malignant Example Image": "images/malignant (1)_aug_0.png"}
110
+
111
+ with gr.Row(visible=True) as example_image_row:
112
+ example_buttons = []
113
+ for label, path in example_images.items():
114
+ with gr.Column():
115
+ gr.Image(value=path, label=label, interactive=False, height=100)
116
+ btn = gr.Button(f"Use {label.split()[1]}")
117
+ example_buttons.append((btn, path))
118
+
119
  feature_inputs = [gr.Number(label=feature) for feature in feature_names]
120
 
121
  # Organizing feature inputs into rows of 3 columns