Spaces:
Running
Running
Moibe
commited on
Commit
•
faa2cc3
1
Parent(s):
7bcb7e4
Back to images
Browse files
app.py
CHANGED
@@ -16,18 +16,18 @@ def greet(input1, input2):
|
|
16 |
#Para los videos es directo.
|
17 |
#Y al parecer PIL ya lo tiene instalado.
|
18 |
|
19 |
-
|
20 |
-
|
21 |
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
-
|
30 |
-
|
31 |
|
32 |
command = "python hola.py -t D:/Esyle-Prod/fotos/irina.jpg"
|
33 |
print(command)
|
@@ -41,14 +41,13 @@ def greet(input1, input2):
|
|
41 |
return input2
|
42 |
|
43 |
#Así para imagenes
|
44 |
-
# demo = gr.Interface(
|
45 |
-
# fn=greet, inputs=[gr.Image(), gr.Image()], outputs="image"
|
46 |
-
# )
|
47 |
-
|
48 |
-
#Así para video
|
49 |
demo = gr.Interface(
|
50 |
-
fn=greet, inputs=[gr.
|
51 |
)
|
52 |
|
|
|
|
|
|
|
|
|
53 |
|
54 |
demo.launch()
|
|
|
16 |
#Para los videos es directo.
|
17 |
#Y al parecer PIL ya lo tiene instalado.
|
18 |
|
19 |
+
source_path = "input.jpg"
|
20 |
+
target_path = "target.jpg"
|
21 |
|
22 |
+
source_image = Image.fromarray(input1)
|
23 |
+
print("Esto es source_image: ", source_image)
|
24 |
+
source_image.save(source_path)
|
25 |
+
target_image = Image.fromarray(input2)
|
26 |
+
print("Esto es target_image: ", target_image)
|
27 |
+
target_image.save(target_path)
|
28 |
|
29 |
+
print("source_path: ", source_path)
|
30 |
+
print("target_path: ", target_path)
|
31 |
|
32 |
command = "python hola.py -t D:/Esyle-Prod/fotos/irina.jpg"
|
33 |
print(command)
|
|
|
41 |
return input2
|
42 |
|
43 |
#Así para imagenes
|
|
|
|
|
|
|
|
|
|
|
44 |
demo = gr.Interface(
|
45 |
+
fn=greet, inputs=[gr.Image(), gr.Image()], outputs="image"
|
46 |
)
|
47 |
|
48 |
+
#Así para video
|
49 |
+
# demo = gr.Interface(
|
50 |
+
# fn=greet, inputs=[gr.Video(), gr.Video()], outputs="video"
|
51 |
+
# )
|
52 |
|
53 |
demo.launch()
|