Update app.py
Browse files26 unmodified lines272829303031323328 unmodified lines626364656526 unmodified lines # Resize or crop image to fit the grid cell size img_width = collage_width // cols img_height = collage_height // rows img_resized = img.resize((img_width, img_height), Image.ANTIALIAS) # Resize to fit img_resized = img.resize((img_width, img_height), Image.Resampling.LANCZOS) # Resize to fit resized_images.append(img_resized)
# Place images on the canvas in grid format without spacing28 unmodified lines download_button = gr.Button("Download Collage") download_button.click(create_collage, inputs=[uploaded_files, grid_layout], outputs=output)
app.launch()app.launch(share=True) # Public link to share the appapp.py+2-2