Spaces:
Sleeping
Sleeping
Gnanashri Kota Venkatesh commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -624,7 +624,7 @@ def excel_extractor_tool():
|
|
| 624 |
try:
|
| 625 |
with cols[col_idx % 3]:
|
| 626 |
img = PILImage.open(file_path)
|
| 627 |
-
st.image(img, caption=os.path.basename(file_path),
|
| 628 |
col_idx += 1
|
| 629 |
except Exception as e:
|
| 630 |
st.write(f"Could not preview {os.path.basename(file_path)}")
|
|
@@ -889,7 +889,7 @@ def white_to_transparent_tool():
|
|
| 889 |
for i, file_path in enumerate(processed_files[:6]): # Show max 6 images
|
| 890 |
with cols[i % 3]:
|
| 891 |
img = PILImage.open(file_path)
|
| 892 |
-
st.image(img, caption=os.path.basename(file_path),
|
| 893 |
|
| 894 |
if len(processed_files) > 6:
|
| 895 |
st.info(f"Showing first 6 images. Total processed: {len(processed_files)}")
|
|
@@ -981,12 +981,12 @@ def find_smallest_dimensions_tool():
|
|
| 981 |
with col1:
|
| 982 |
st.subheader("Smallest Width")
|
| 983 |
st.write(f"Dimensions: {min_width} × {height_at_min_width} px")
|
| 984 |
-
st.image(file_min_width, caption=os.path.basename(file_min_width),
|
| 985 |
|
| 986 |
with col2:
|
| 987 |
st.subheader("Smallest Height")
|
| 988 |
st.write(f"Dimensions: {width_at_min_height} × {min_height} px")
|
| 989 |
-
st.image(file_min_height, caption=os.path.basename(file_min_height),
|
| 990 |
else:
|
| 991 |
st.warning("No valid image files found in the uploaded zip.")
|
| 992 |
|
|
@@ -1174,7 +1174,7 @@ def resize_with_transparent_canvas_tool():
|
|
| 1174 |
for i, file_path in enumerate(sample_files):
|
| 1175 |
with cols[i % 3]:
|
| 1176 |
img = PILImage.open(file_path)
|
| 1177 |
-
st.image(img, caption=os.path.basename(file_path),
|
| 1178 |
|
| 1179 |
if processed_count > 6:
|
| 1180 |
st.info(f"Showing sample images. Total processed: {processed_count}")
|
|
@@ -1327,7 +1327,7 @@ def center_on_canvas_tool():
|
|
| 1327 |
for i, file_path in enumerate(sample_files):
|
| 1328 |
with cols[i % 3]:
|
| 1329 |
img = PILImage.open(file_path)
|
| 1330 |
-
st.image(img, caption=os.path.basename(file_path),
|
| 1331 |
|
| 1332 |
if processed_count > 6:
|
| 1333 |
st.info(f"Showing sample images. Total processed: {processed_count}")
|
|
|
|
| 624 |
try:
|
| 625 |
with cols[col_idx % 3]:
|
| 626 |
img = PILImage.open(file_path)
|
| 627 |
+
st.image(img, caption=os.path.basename(file_path), use_column_width =True)
|
| 628 |
col_idx += 1
|
| 629 |
except Exception as e:
|
| 630 |
st.write(f"Could not preview {os.path.basename(file_path)}")
|
|
|
|
| 889 |
for i, file_path in enumerate(processed_files[:6]): # Show max 6 images
|
| 890 |
with cols[i % 3]:
|
| 891 |
img = PILImage.open(file_path)
|
| 892 |
+
st.image(img, caption=os.path.basename(file_path), use_column_width=True)
|
| 893 |
|
| 894 |
if len(processed_files) > 6:
|
| 895 |
st.info(f"Showing first 6 images. Total processed: {len(processed_files)}")
|
|
|
|
| 981 |
with col1:
|
| 982 |
st.subheader("Smallest Width")
|
| 983 |
st.write(f"Dimensions: {min_width} × {height_at_min_width} px")
|
| 984 |
+
st.image(file_min_width, caption=os.path.basename(file_min_width), use_column_width =True)
|
| 985 |
|
| 986 |
with col2:
|
| 987 |
st.subheader("Smallest Height")
|
| 988 |
st.write(f"Dimensions: {width_at_min_height} × {min_height} px")
|
| 989 |
+
st.image(file_min_height, caption=os.path.basename(file_min_height), use_column_width =True)
|
| 990 |
else:
|
| 991 |
st.warning("No valid image files found in the uploaded zip.")
|
| 992 |
|
|
|
|
| 1174 |
for i, file_path in enumerate(sample_files):
|
| 1175 |
with cols[i % 3]:
|
| 1176 |
img = PILImage.open(file_path)
|
| 1177 |
+
st.image(img, caption=os.path.basename(file_path), use_column_width=True)
|
| 1178 |
|
| 1179 |
if processed_count > 6:
|
| 1180 |
st.info(f"Showing sample images. Total processed: {processed_count}")
|
|
|
|
| 1327 |
for i, file_path in enumerate(sample_files):
|
| 1328 |
with cols[i % 3]:
|
| 1329 |
img = PILImage.open(file_path)
|
| 1330 |
+
st.image(img, caption=os.path.basename(file_path), use_column_width=True)
|
| 1331 |
|
| 1332 |
if processed_count > 6:
|
| 1333 |
st.info(f"Showing sample images. Total processed: {processed_count}")
|