Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,6 @@ import gradio as gr
|
|
| 2 |
from PIL import Image, ImageStat
|
| 3 |
import numpy as np
|
| 4 |
import os
|
| 5 |
-
import math
|
| 6 |
import shutil
|
| 7 |
import random
|
| 8 |
|
|
@@ -95,8 +94,8 @@ def process_images(uploaded_images):
|
|
| 95 |
# Gradio UI
|
| 96 |
interface = gr.Interface(
|
| 97 |
fn=process_images,
|
| 98 |
-
inputs=gr.
|
| 99 |
-
outputs=gr.
|
| 100 |
title="Image Resizer and Combiner",
|
| 101 |
description="Upload multiple images. This tool will resize and pad them to match a consistent size, then combine every four images into one. The output will be resized if it exceeds 2048x2048, and all results are available as a ZIP file."
|
| 102 |
)
|
|
|
|
| 2 |
from PIL import Image, ImageStat
|
| 3 |
import numpy as np
|
| 4 |
import os
|
|
|
|
| 5 |
import shutil
|
| 6 |
import random
|
| 7 |
|
|
|
|
| 94 |
# Gradio UI
|
| 95 |
interface = gr.Interface(
|
| 96 |
fn=process_images,
|
| 97 |
+
inputs=gr.Files(file_types=["image"], label="Upload Images"),
|
| 98 |
+
outputs=gr.File(label="Download ZIP"),
|
| 99 |
title="Image Resizer and Combiner",
|
| 100 |
description="Upload multiple images. This tool will resize and pad them to match a consistent size, then combine every four images into one. The output will be resized if it exceeds 2048x2048, and all results are available as a ZIP file."
|
| 101 |
)
|