Spaces:
Runtime error
Runtime error
Update injection_main_HF.py
Browse files- injection_main_HF.py +39 -15
injection_main_HF.py
CHANGED
@@ -630,19 +630,43 @@ if __name__ == "__main__":
|
|
630 |
label="Seed",
|
631 |
info="Random seed for the model",
|
632 |
)
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
648 |
app.launch(show_api=False, show_error=True)
|
|
|
630 |
label="Seed",
|
631 |
info="Random seed for the model",
|
632 |
)
|
633 |
+
image_output= gr.Image(format="png")
|
634 |
+
|
635 |
+
with gr.Blocks() as app:
|
636 |
+
|
637 |
+
with gr.Column():
|
638 |
+
gr.Markdown("Artist Interactive Demo")
|
639 |
+
with gr.row():
|
640 |
+
with gr.Column():
|
641 |
+
text_input.render()
|
642 |
+
image_input.render()
|
643 |
+
with gr.Accordion("Advanced settings"):
|
644 |
+
with gr.Column():
|
645 |
+
cfg_slider.render()
|
646 |
+
content_slider.render()
|
647 |
+
style_slider.render()
|
648 |
+
seed_slider.render()
|
649 |
+
submit_btn = gr.Button("Submit")
|
650 |
+
with gr.Column():
|
651 |
+
image_output.render()
|
652 |
+
gr.Examples(
|
653 |
+
examples = examples,
|
654 |
+
inputs = [text_input, image_input],
|
655 |
+
cache_examples=False
|
656 |
+
)
|
657 |
+
submit_btn.click(
|
658 |
+
fn=style_transfer_app,
|
659 |
+
inputs=[
|
660 |
+
text_input,
|
661 |
+
image_input,
|
662 |
+
cfg_slider,
|
663 |
+
content_slider,
|
664 |
+
style_slider,
|
665 |
+
seed_slider,
|
666 |
+
],
|
667 |
+
outputs=[image_output],
|
668 |
+
show_api=False
|
669 |
+
)
|
670 |
+
|
671 |
+
|
672 |
app.launch(show_api=False, show_error=True)
|