Linoy Tsaban
commited on
Commit
·
54617f0
1
Parent(s):
19aee39
Update app.py
Browse files
app.py
CHANGED
|
@@ -95,9 +95,9 @@ For faster inference without waiting in queue, you may duplicate the space and u
|
|
| 95 |
with gr.Blocks(css='style.css') as demo:
|
| 96 |
|
| 97 |
def reset_latents():
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
|
| 102 |
def edit(input_image,
|
| 103 |
wt, zs, wts,
|
|
@@ -129,8 +129,6 @@ with gr.Blocks(css='style.css') as demo:
|
|
| 129 |
with gr.Row():
|
| 130 |
input_image = gr.Image(label="Input Image", interactive=True)
|
| 131 |
input_image.style(height=512, width=512)
|
| 132 |
-
# inverted_image = gr.Image(label=f"Reconstructed Image", interactive=False)
|
| 133 |
-
# inverted_image.style(height=512, width=512)
|
| 134 |
output_image = gr.Image(label=f"Edited Image", interactive=False)
|
| 135 |
output_image.style(height=512, width=512)
|
| 136 |
|
|
@@ -138,10 +136,6 @@ with gr.Blocks(css='style.css') as demo:
|
|
| 138 |
tar_prompt = gr.Textbox(lines=1, label="Describe the image yout want", interactive=True, placeholder="tip: use concepts from the original image for the description")
|
| 139 |
|
| 140 |
with gr.Row():
|
| 141 |
-
# with gr.Column(scale=1, min_width=100):
|
| 142 |
-
# invert_button = gr.Button("Invert")
|
| 143 |
-
# with gr.Column(scale=1, min_width=100):
|
| 144 |
-
# edit_button = gr.Button("Edit")
|
| 145 |
with gr.Column(scale=1, min_width=100):
|
| 146 |
edit_button = gr.Button("Run")
|
| 147 |
|
|
@@ -195,8 +189,6 @@ with gr.Blocks(css='style.css') as demo:
|
|
| 195 |
output_image
|
| 196 |
],
|
| 197 |
outputs=[output_image ],
|
| 198 |
-
# fn=edit,
|
| 199 |
-
# cache_examples=True
|
| 200 |
)
|
| 201 |
|
| 202 |
|
|
|
|
| 95 |
with gr.Blocks(css='style.css') as demo:
|
| 96 |
|
| 97 |
def reset_latents():
|
| 98 |
+
wt = gr.State(value=None)
|
| 99 |
+
zs = gr.State(value=None)
|
| 100 |
+
wts = gr.State(value=None)
|
| 101 |
|
| 102 |
def edit(input_image,
|
| 103 |
wt, zs, wts,
|
|
|
|
| 129 |
with gr.Row():
|
| 130 |
input_image = gr.Image(label="Input Image", interactive=True)
|
| 131 |
input_image.style(height=512, width=512)
|
|
|
|
|
|
|
| 132 |
output_image = gr.Image(label=f"Edited Image", interactive=False)
|
| 133 |
output_image.style(height=512, width=512)
|
| 134 |
|
|
|
|
| 136 |
tar_prompt = gr.Textbox(lines=1, label="Describe the image yout want", interactive=True, placeholder="tip: use concepts from the original image for the description")
|
| 137 |
|
| 138 |
with gr.Row():
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
with gr.Column(scale=1, min_width=100):
|
| 140 |
edit_button = gr.Button("Run")
|
| 141 |
|
|
|
|
| 189 |
output_image
|
| 190 |
],
|
| 191 |
outputs=[output_image ],
|
|
|
|
|
|
|
| 192 |
)
|
| 193 |
|
| 194 |
|