Spaces:
Build error
Build error
Moibe
commited on
Commit
路
c632e3d
1
Parent(s):
3f770cf
Se remueve temporalmente outout zip
Browse files
app.py
CHANGED
|
@@ -145,11 +145,12 @@ def greet(input1, input2):
|
|
| 145 |
|
| 146 |
# print("Esto es la lista de imagenes: ", images)
|
| 147 |
|
| 148 |
-
nombre_zip = nom_video + ".zip"
|
| 149 |
-
print("El nombre del zip ser谩: ", nombre_zip)
|
| 150 |
|
| 151 |
try:
|
| 152 |
-
save_images_as_zip(path_foto, nombre_zip, plataforma)
|
|
|
|
| 153 |
|
| 154 |
except Exception as e:
|
| 155 |
# c贸digo que se ejecutar谩 si se produce la excepci贸n
|
|
@@ -159,13 +160,13 @@ def greet(input1, input2):
|
|
| 159 |
#Para video
|
| 160 |
path = pathlib.Path("result.mp4")
|
| 161 |
path_abs = os.path.abspath(path)
|
| 162 |
-
path_zip = pathlib.Path(nombre_zip)
|
| 163 |
-
path_zip_abs = os.path.abspath(path_zip)
|
| 164 |
print("脡ste es el path para video:", path)
|
| 165 |
print("Y su ruta absoluta es: ", path_abs)
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
|
|
|
|
|
|
| 169 |
else:
|
| 170 |
#Para imagen
|
| 171 |
path = pathlib.Path("result.png")
|
|
@@ -182,9 +183,14 @@ def greet(input1, input2):
|
|
| 182 |
# demo = gr.Interface(
|
| 183 |
# fn=greet, inputs=[gr.Image(), gr.Video()], outputs=[gr.Video(), gr.Gallery(), gr.File()]
|
| 184 |
# )
|
| 185 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 186 |
demo = gr.Interface(
|
| 187 |
-
fn=greet, inputs=[gr.Image(), gr.Video()], outputs=[gr.Video()
|
| 188 |
)
|
| 189 |
-
|
| 190 |
demo.launch()
|
|
|
|
| 145 |
|
| 146 |
# print("Esto es la lista de imagenes: ", images)
|
| 147 |
|
| 148 |
+
#nombre_zip = nom_video + ".zip"
|
| 149 |
+
#print("El nombre del zip ser谩: ", nombre_zip)
|
| 150 |
|
| 151 |
try:
|
| 152 |
+
#save_images_as_zip(path_foto, nombre_zip, plataforma)
|
| 153 |
+
print("脡sta vez no crearemos archivo zip.")
|
| 154 |
|
| 155 |
except Exception as e:
|
| 156 |
# c贸digo que se ejecutar谩 si se produce la excepci贸n
|
|
|
|
| 160 |
#Para video
|
| 161 |
path = pathlib.Path("result.mp4")
|
| 162 |
path_abs = os.path.abspath(path)
|
|
|
|
|
|
|
| 163 |
print("脡ste es el path para video:", path)
|
| 164 |
print("Y su ruta absoluta es: ", path_abs)
|
| 165 |
+
#path_zip = pathlib.Path(nombre_zip)
|
| 166 |
+
#path_zip_abs = os.path.abspath(path_zip)
|
| 167 |
+
#print("Y 茅ste es el path para el zip: ", path_zip)
|
| 168 |
+
#print("Y su ruta absoluta es: ", path_zip_abs)
|
| 169 |
+
return path
|
| 170 |
else:
|
| 171 |
#Para imagen
|
| 172 |
path = pathlib.Path("result.png")
|
|
|
|
| 183 |
# demo = gr.Interface(
|
| 184 |
# fn=greet, inputs=[gr.Image(), gr.Video()], outputs=[gr.Video(), gr.Gallery(), gr.File()]
|
| 185 |
# )
|
| 186 |
+
|
| 187 |
+
#As铆 para 2 outputs, video y zip.
|
| 188 |
+
# demo = gr.Interface(
|
| 189 |
+
# fn=greet, inputs=[gr.Image(), gr.Video()], outputs=[gr.Video(), gr.File()]
|
| 190 |
+
# )
|
| 191 |
+
|
| 192 |
+
#1 output: video.
|
| 193 |
demo = gr.Interface(
|
| 194 |
+
fn=greet, inputs=[gr.Image(), gr.Video()], outputs=[gr.Video()]
|
| 195 |
)
|
|
|
|
| 196 |
demo.launch()
|