Spaces:
Build error
Build error
Commit
·
6979d75
1
Parent(s):
9d91d56
Update app.py
Browse files
app.py
CHANGED
@@ -272,6 +272,9 @@ class ImageEditor(object):
|
|
272 |
|
273 |
output_paths.append(output_path)
|
274 |
|
|
|
|
|
|
|
275 |
return output_paths
|
276 |
|
277 |
return self.generate_vid(generators, inverted_latent, target_latents, out_dir)
|
@@ -378,21 +381,34 @@ with blocks:
|
|
378 |
sc_edit_choices = [src_text_styleclip, tar_text_styleclip, alpha_styleclip, beta_styleclip]
|
379 |
|
380 |
edit_inputs = [editing_type_choice] + ig_edit_choices + sc_edit_choices
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
img_button.click(fn=editor.edit_image, inputs=edit_inputs + [input_img, style_choice], outputs=img_output)
|
382 |
vid_button.click(fn=editor.edit_video, inputs=edit_inputs + [input_img, style_choice, loop_styles], outputs=vid_output)
|
383 |
|
|
|
|
|
384 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2108.00946' target='_blank'>StyleGAN-NADA: CLIP-Guided Domain Adaptation of Image Generators</a> | <a href='https://stylegan-nada.github.io/' target='_blank'>Project Page</a> | <a href='https://github.com/rinongal/StyleGAN-nada' target='_blank'>Code</a></p> <center><img src='https://visitor-badge.glitch.me/badge?page_id=rinong_sgnada' alt='visitor badge'></center>"
|
385 |
gr.Markdown(article)
|
386 |
|
387 |
-
|
388 |
|
389 |
|
390 |
-
def my_inference_function(name):
|
391 |
-
return "Hello " + name + "!"
|
392 |
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
|
|
|
|
|
272 |
|
273 |
output_paths.append(output_path)
|
274 |
|
275 |
+
print("------ img_output ----\n")
|
276 |
+
print(output_paths)
|
277 |
+
|
278 |
return output_paths
|
279 |
|
280 |
return self.generate_vid(generators, inverted_latent, target_latents, out_dir)
|
|
|
381 |
sc_edit_choices = [src_text_styleclip, tar_text_styleclip, alpha_styleclip, beta_styleclip]
|
382 |
|
383 |
edit_inputs = [editing_type_choice] + ig_edit_choices + sc_edit_choices
|
384 |
+
|
385 |
+
print("----- edit_inputs -----\n")
|
386 |
+
print(edit_inputs)
|
387 |
+
print("----- input_img -----\n")
|
388 |
+
print(input_img)
|
389 |
+
print("----- style_choice -----\n")
|
390 |
+
print(style_choice)
|
391 |
+
print("------ all ----\n")
|
392 |
+
print(edit_inputs + [input_img, style_choice])
|
393 |
+
|
394 |
+
|
395 |
img_button.click(fn=editor.edit_image, inputs=edit_inputs + [input_img, style_choice], outputs=img_output)
|
396 |
vid_button.click(fn=editor.edit_video, inputs=edit_inputs + [input_img, style_choice, loop_styles], outputs=vid_output)
|
397 |
|
398 |
+
|
399 |
+
|
400 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2108.00946' target='_blank'>StyleGAN-NADA: CLIP-Guided Domain Adaptation of Image Generators</a> | <a href='https://stylegan-nada.github.io/' target='_blank'>Project Page</a> | <a href='https://github.com/rinongal/StyleGAN-nada' target='_blank'>Code</a></p> <center><img src='https://visitor-badge.glitch.me/badge?page_id=rinong_sgnada' alt='visitor badge'></center>"
|
401 |
gr.Markdown(article)
|
402 |
|
403 |
+
blocks.launch(enable_queue=True)
|
404 |
|
405 |
|
|
|
|
|
406 |
|
407 |
+
|
408 |
+
#gradio_interface = gr.Interface(
|
409 |
+
# fn=editor.edit_image,
|
410 |
+
# inputs=["text","text"],
|
411 |
+
|
412 |
+
# outputs=img_output
|
413 |
+
#)
|
414 |
+
#gradio_interface.launch()
|