Update app.py
Browse files
app.py
CHANGED
@@ -1,22 +1,17 @@
|
|
1 |
import gradio as gr
|
2 |
from PIL import Image
|
3 |
|
4 |
-
def
|
5 |
-
|
6 |
-
|
7 |
-
prenda_imagen = prenda_imagen.resize(maniqui.size)
|
8 |
-
combinado = Image.blend(maniqui, prenda_imagen, alpha=0.5)
|
9 |
-
return combinado
|
10 |
|
11 |
-
|
12 |
-
fn=
|
13 |
inputs=[
|
14 |
-
gr.Image(label="Tu
|
15 |
-
gr.Image(label="Imagen de
|
16 |
],
|
17 |
-
outputs="
|
18 |
-
title="Probador Virtual AI",
|
19 |
-
description="Sube tu maniqu铆 y una prenda para ver c贸mo te queda."
|
20 |
)
|
21 |
|
22 |
-
|
|
|
1 |
import gradio as gr
|
2 |
from PIL import Image
|
3 |
|
4 |
+
def combinar(imagen_usuario, imagen_prenda):
|
5 |
+
# Aqu铆 deber铆as incluir el c贸digo real para fusionar im谩genes (ej: con IA o superposici贸n)
|
6 |
+
return imagen_usuario
|
|
|
|
|
|
|
7 |
|
8 |
+
demo = gr.Interface(
|
9 |
+
fn=combinar,
|
10 |
inputs=[
|
11 |
+
gr.Image(label="Tu foto", type="pil"),
|
12 |
+
gr.Image(label="Imagen de prenda", type="pil")
|
13 |
],
|
14 |
+
outputs=gr.Image(label="Resultado")
|
|
|
|
|
15 |
)
|
16 |
|
17 |
+
demo.launch()
|