Update app.py
Browse files
app.py
CHANGED
|
@@ -23,9 +23,14 @@ def main():
|
|
| 23 |
image = Image.open(uploaded_file)
|
| 24 |
st.session_state.images.append(image)
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
# Reset button
|
| 31 |
if st.button('Reset and Start Over'):
|
|
|
|
| 23 |
image = Image.open(uploaded_file)
|
| 24 |
st.session_state.images.append(image)
|
| 25 |
|
| 26 |
+
# Display images in a grid
|
| 27 |
+
cols_per_row = 4
|
| 28 |
+
for i in range(0, len(st.session_state.images), cols_per_row):
|
| 29 |
+
cols = st.columns(cols_per_row)
|
| 30 |
+
for j in range(cols_per_row):
|
| 31 |
+
if i + j < len(st.session_state.images):
|
| 32 |
+
with cols[j]:
|
| 33 |
+
st.image(st.session_state.images[i + j], caption=f"Image {i + j + 1}", use_column_width=True)
|
| 34 |
|
| 35 |
# Reset button
|
| 36 |
if st.button('Reset and Start Over'):
|