Spaces:
Running
Running
Update app.py
Browse files
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
|