Spaces:
Build error
Build error
yourusername
commited on
Commit
•
eb3d2f3
1
Parent(s):
6e08746
app.py
CHANGED
@@ -321,6 +321,7 @@ if start:
|
|
321 |
st.write(v)
|
322 |
|
323 |
elif image_classification and gallary:
|
|
|
324 |
d = d.prepare_for_task('image-classification')
|
325 |
n_cols, n_rows = 5, 10
|
326 |
|
@@ -335,10 +336,9 @@ if start:
|
|
335 |
labels.append(f"#{item} | {label_str}")
|
336 |
|
337 |
n_rows = 1 + len(images) // int(n_cols)
|
338 |
-
rows = [st.container() for _ in range(n_rows)]
|
339 |
-
cols_per_row = [r.columns(n_cols) for r in rows]
|
340 |
-
cols = [column for row in cols_per_row for column in row]
|
341 |
|
|
|
|
|
342 |
for idx, (image, label) in enumerate(zip(images, labels)):
|
343 |
cols[idx].image(image, caption=label)
|
344 |
|
321 |
st.write(v)
|
322 |
|
323 |
elif image_classification and gallary:
|
324 |
+
# Image Gallary View.
|
325 |
d = d.prepare_for_task('image-classification')
|
326 |
n_cols, n_rows = 5, 10
|
327 |
|
336 |
labels.append(f"#{item} | {label_str}")
|
337 |
|
338 |
n_rows = 1 + len(images) // int(n_cols)
|
|
|
|
|
|
|
339 |
|
340 |
+
cols_per_row = [st.beta_columns(n_cols) for _ in range(n_rows)]
|
341 |
+
cols = [column for row in cols_per_row for column in row]
|
342 |
for idx, (image, label) in enumerate(zip(images, labels)):
|
343 |
cols[idx].image(image, caption=label)
|
344 |
|