Spaces:
Runtime error
Runtime error
sashavor
commited on
Commit
·
997ca15
1
Parent(s):
93330ce
adding 8 images, changing order
Browse files
app.py
CHANGED
|
@@ -66,7 +66,7 @@ def show_cluster(cl_id, num_clusters):
|
|
| 66 |
num_clusters = 12
|
| 67 |
cl_dct = clusters_by_size[num_clusters][cl_id]
|
| 68 |
images = []
|
| 69 |
-
for i in range(
|
| 70 |
img_path = "/".join(
|
| 71 |
[st.replace("/", "") for st in cl_dct["img_path_list"][i].split("//")][3:]
|
| 72 |
)
|
|
@@ -133,8 +133,6 @@ with gr.Blocks(title=TITLE) as demo:
|
|
| 133 |
)
|
| 134 |
|
| 135 |
with gr.Row():
|
| 136 |
-
with gr.Column():
|
| 137 |
-
gallery = gr.Gallery(label="Most representative images in cluster").style(grid=[2,3], height="auto")
|
| 138 |
with gr.Column():
|
| 139 |
cluster_id = gr.Dropdown(
|
| 140 |
choices=[i for i in range(num_clusters.value)],
|
|
@@ -142,6 +140,8 @@ with gr.Blocks(title=TITLE) as demo:
|
|
| 142 |
label="Select cluster to visualize:",
|
| 143 |
)
|
| 144 |
a = gr.Text(label="Number of images")
|
|
|
|
|
|
|
| 145 |
with gr.Row():
|
| 146 |
with gr.Column():
|
| 147 |
c = gr.Plot(label="How many images from each system?")
|
|
|
|
| 66 |
num_clusters = 12
|
| 67 |
cl_dct = clusters_by_size[num_clusters][cl_id]
|
| 68 |
images = []
|
| 69 |
+
for i in range(8):
|
| 70 |
img_path = "/".join(
|
| 71 |
[st.replace("/", "") for st in cl_dct["img_path_list"][i].split("//")][3:]
|
| 72 |
)
|
|
|
|
| 133 |
)
|
| 134 |
|
| 135 |
with gr.Row():
|
|
|
|
|
|
|
| 136 |
with gr.Column():
|
| 137 |
cluster_id = gr.Dropdown(
|
| 138 |
choices=[i for i in range(num_clusters.value)],
|
|
|
|
| 140 |
label="Select cluster to visualize:",
|
| 141 |
)
|
| 142 |
a = gr.Text(label="Number of images")
|
| 143 |
+
with gr.Column():
|
| 144 |
+
gallery = gr.Gallery(label="Most representative images in cluster").style(grid=[2,4], height="auto")
|
| 145 |
with gr.Row():
|
| 146 |
with gr.Column():
|
| 147 |
c = gr.Plot(label="How many images from each system?")
|