xizaoqu
commited on
Commit
·
eda3a61
1
Parent(s):
9aecb9a
update
Browse files
app.py
CHANGED
@@ -200,13 +200,11 @@ def set_denoising_steps(denoising_steps, sampling_timesteps_state):
|
|
200 |
print("set denoising steps to", worldmem.sampling_timesteps)
|
201 |
return sampling_timesteps_state
|
202 |
|
203 |
-
def
|
|
|
204 |
actions = parse_input_to_tensor(keys)
|
205 |
global input_history
|
206 |
global memory_curr_frame
|
207 |
-
|
208 |
-
print("algo frame:", len(worldmem.frames))
|
209 |
-
|
210 |
for i in range(len(actions)):
|
211 |
memory_curr_frame += 1
|
212 |
|
@@ -370,7 +368,7 @@ with gr.Blocks(css=css) as demo:
|
|
370 |
"""
|
371 |
)
|
372 |
# input_box.submit(update_image_and_log, inputs=[input_box], outputs=[image_display, video_display, log_output])
|
373 |
-
submit_button.click(
|
374 |
reset_btn.click(reset, outputs=[log_output, image_display])
|
375 |
image_display_1.select(lambda: on_image_click(SUNFLOWERS_IMAGE), outputs=image_display)
|
376 |
image_display_2.select(lambda: on_image_click(DESERT_IMAGE), outputs=image_display)
|
|
|
200 |
print("set denoising steps to", worldmem.sampling_timesteps)
|
201 |
return sampling_timesteps_state
|
202 |
|
203 |
+
def generate(keys):
|
204 |
+
print("algo frame:", len(worldmem.frames))
|
205 |
actions = parse_input_to_tensor(keys)
|
206 |
global input_history
|
207 |
global memory_curr_frame
|
|
|
|
|
|
|
208 |
for i in range(len(actions)):
|
209 |
memory_curr_frame += 1
|
210 |
|
|
|
368 |
"""
|
369 |
)
|
370 |
# input_box.submit(update_image_and_log, inputs=[input_box], outputs=[image_display, video_display, log_output])
|
371 |
+
submit_button.click(generate, inputs=[input_box], outputs=[image_display, video_display, log_output])
|
372 |
reset_btn.click(reset, outputs=[log_output, image_display])
|
373 |
image_display_1.select(lambda: on_image_click(SUNFLOWERS_IMAGE), outputs=image_display)
|
374 |
image_display_2.select(lambda: on_image_click(DESERT_IMAGE), outputs=image_display)
|