Spaces:
Runtime error
Runtime error
import gradio as gr | |
from PIL import Image | |
def process_image(image): | |
image_pil = Image.fromarray(image) | |
width, height = image_pil.size | |
new_image = Image.new('RGB', (width * 2, height)) | |
new_image.paste(image_pil, (0, 0)) | |
new_image.paste(image_pil, (width, 0)) | |
return new_image | |
gr.Interface(fn=process_image, inputs="image", outputs="image").launch() | |