Spaces:
Running
Running
gera-richarte
commited on
Commit
•
711dd45
1
Parent(s):
85ded11
no number of rows control... it's not changing anything
Browse files
app.py
CHANGED
@@ -77,8 +77,8 @@ def get_images(batch_size, only_rgb, state):
|
|
77 |
|
78 |
return images, DataFrame(metadatas)
|
79 |
|
80 |
-
def update_shape(
|
81 |
-
return gr.update(
|
82 |
|
83 |
def new_state():
|
84 |
return gr.State({})
|
@@ -97,7 +97,7 @@ if __name__ == "__main__":
|
|
97 |
label=ev.DATASET,
|
98 |
interactive=False,
|
99 |
object_fit="scale-down",
|
100 |
-
columns=5,
|
101 |
|
102 |
with gr.Row():
|
103 |
dataset = gr.Textbox(label="Dataset", value=ev.DATASET, interactive=False)
|
@@ -116,11 +116,9 @@ if __name__ == "__main__":
|
|
116 |
with gr.Row():
|
117 |
batch_size.render()
|
118 |
|
119 |
-
rows = gr.Number(2, label="Rows")
|
120 |
columns = gr.Number(5, label="Columns")
|
121 |
|
122 |
-
|
123 |
-
columns.change(update_shape, [rows, columns], [gallery])
|
124 |
|
125 |
with gr.Row():
|
126 |
shard.render()
|
|
|
77 |
|
78 |
return images, DataFrame(metadatas)
|
79 |
|
80 |
+
def update_shape(columns):
|
81 |
+
return gr.update(columns=columns)
|
82 |
|
83 |
def new_state():
|
84 |
return gr.State({})
|
|
|
97 |
label=ev.DATASET,
|
98 |
interactive=False,
|
99 |
object_fit="scale-down",
|
100 |
+
columns=5, render=False)
|
101 |
|
102 |
with gr.Row():
|
103 |
dataset = gr.Textbox(label="Dataset", value=ev.DATASET, interactive=False)
|
|
|
116 |
with gr.Row():
|
117 |
batch_size.render()
|
118 |
|
|
|
119 |
columns = gr.Number(5, label="Columns")
|
120 |
|
121 |
+
columns.change(update_shape, [columns], [gallery])
|
|
|
122 |
|
123 |
with gr.Row():
|
124 |
shard.render()
|