Spaces:
Running
Running
gera-richarte
commited on
Commit
·
86c8985
1
Parent(s):
7e3988e
no more (old) skip code
Browse files
app.py
CHANGED
@@ -108,20 +108,6 @@ def get_images(batch_size):
|
|
108 |
|
109 |
return items, DataFrame(metadatas)
|
110 |
|
111 |
-
def skip(count, batch_size):
|
112 |
-
global dsi
|
113 |
-
|
114 |
-
skip = count*batch_size
|
115 |
-
|
116 |
-
gr.Info(f"Skipping {skip} images (it's slow)")
|
117 |
-
for i in tqdm.trange(skip, desc=f"Skipping {skip} images"):
|
118 |
-
if DEBUG:
|
119 |
-
pass
|
120 |
-
else:
|
121 |
-
next(dsi)
|
122 |
-
|
123 |
-
return get_images(batch_size)
|
124 |
-
|
125 |
def update_shape(rows, columns):
|
126 |
return gr.update(rows=rows, columns=columns)
|
127 |
|
@@ -170,12 +156,6 @@ with gr.Blocks(title="Dataset Explorer", fill_height = True) as demo:
|
|
170 |
btn = gr.Button("Get More Images", scale=0)
|
171 |
btn.click(get_images, [batch_size], [gallery, table])
|
172 |
btn.click()
|
173 |
-
|
174 |
-
# btn = gr.Button("Skip 10 Batches", scale=0)
|
175 |
-
# btn.click(partial(skip, 10), [batch], gallery)
|
176 |
-
|
177 |
-
# btn = gr.Button("Skip 25 Batches", scale=0)
|
178 |
-
# btn.click(partial(skip, 25), [batch], gallery)
|
179 |
|
180 |
table.render()
|
181 |
|
|
|
108 |
|
109 |
return items, DataFrame(metadatas)
|
110 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
def update_shape(rows, columns):
|
112 |
return gr.update(rows=rows, columns=columns)
|
113 |
|
|
|
156 |
btn = gr.Button("Get More Images", scale=0)
|
157 |
btn.click(get_images, [batch_size], [gallery, table])
|
158 |
btn.click()
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
|
160 |
table.render()
|
161 |
|