Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,9 +2,12 @@ import gradio as gr
|
|
2 |
from PIL import Image
|
3 |
|
4 |
def process_image(image):
|
5 |
-
|
6 |
-
|
7 |
-
new_image.
|
|
|
|
|
8 |
return new_image
|
9 |
|
10 |
gr.Interface(fn=process_image, inputs="image", outputs="image").launch()
|
|
|
|
2 |
from PIL import Image
|
3 |
|
4 |
def process_image(image):
|
5 |
+
image_pil = Image.fromarray(image)
|
6 |
+
width, height = image_pil.size
|
7 |
+
new_image = Image.new('RGB', (width * 2, height))
|
8 |
+
new_image.paste(image_pil, (0, 0))
|
9 |
+
new_image.paste(image_pil, (width, 0))
|
10 |
return new_image
|
11 |
|
12 |
gr.Interface(fn=process_image, inputs="image", outputs="image").launch()
|
13 |
+
|