Linoy Tsaban commited on
Commit
f1f5181
1 Parent(s): 08e3a0e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -96,8 +96,8 @@ For faster inference without waiting in queue, you may duplicate the space and u
96
  with gr.Blocks(css='style.css') as demo:
97
 
98
  def reset_latents():
99
- xt = gr.State(value=None)
100
- zs = gr.State(value=None)
101
 
102
 
103
  def edit(input_image,
@@ -126,12 +126,11 @@ with gr.Blocks(css='style.css') as demo:
126
 
127
  output = sample(zs, xt, prompt_tar=tar_prompt, cfg_scale_tar=cfg_scale_tar)
128
 
129
- return output
130
 
131
  gr.HTML(intro)
132
- wt = gr.State(value=False)
133
  zs = gr.State(value=False)
134
- wts = gr.State(value=False)
135
  with gr.Row():
136
  input_image = gr.Image(label="Input Image", interactive=True)
137
  input_image.style(height=512, width=512)
@@ -175,7 +174,7 @@ with gr.Blocks(css='style.css') as demo:
175
  seed,
176
  randomize_seed
177
  ],
178
- outputs=[output_image],
179
  )
180
 
181
  input_image.change(
 
96
  with gr.Blocks(css='style.css') as demo:
97
 
98
  def reset_latents():
99
+ xt = gr.State(value=False)
100
+ zs = gr.State(value=False)
101
 
102
 
103
  def edit(input_image,
 
126
 
127
  output = sample(zs, xt, prompt_tar=tar_prompt, cfg_scale_tar=cfg_scale_tar)
128
 
129
+ return output, xt, zs
130
 
131
  gr.HTML(intro)
132
+ xt = gr.State(value=False)
133
  zs = gr.State(value=False)
 
134
  with gr.Row():
135
  input_image = gr.Image(label="Input Image", interactive=True)
136
  input_image.style(height=512, width=512)
 
174
  seed,
175
  randomize_seed
176
  ],
177
+ outputs=[output_image, xt, zs],
178
  )
179
 
180
  input_image.change(