Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -327,43 +327,43 @@ with gr.Blocks() as demo:
|
|
327 |
|
328 |
with gr.Row(elem_id="run_sim_btn", visible=False) as run_sim_btn:
|
329 |
submit_btn = gr.Button("Run Simulation")
|
330 |
-
submit_btn.click(run_simulation,
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
|
350 |
with gr.Row(elem_id="init_btn", visible=True) as init_btn:
|
351 |
submit_btn = gr.Button("Initialize Bot")
|
352 |
-
submit_btn.click(init_app,
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
|
368 |
with gr.Row(elem_id="reset_block", visible=True) as reset_block:
|
369 |
reset_btn = gr.Button("Reset")
|
@@ -371,7 +371,7 @@ with gr.Blocks() as demo:
|
|
371 |
topic, topic_prompt, with_images, image_params,
|
372 |
main_block_step_1, main_block_step_2,
|
373 |
simulation_output_box,
|
374 |
-
run_sim_btn, init_btn], cancels=[
|
375 |
|
376 |
with gr.Column(elem_id = "user_consent_container") as user_consent_block:
|
377 |
accept_checkbox = gr.Checkbox(visible=False)
|
|
|
327 |
|
328 |
with gr.Row(elem_id="run_sim_btn", visible=False) as run_sim_btn:
|
329 |
submit_btn = gr.Button("Run Simulation")
|
330 |
+
submt_process = submit_btn.click(run_simulation,
|
331 |
+
inputs=[topic,
|
332 |
+
save,
|
333 |
+
num_responses,
|
334 |
+
n,
|
335 |
+
system_prompt,
|
336 |
+
with_images,
|
337 |
+
img_mode,
|
338 |
+
augment_mode,
|
339 |
+
image_every_n_posts,
|
340 |
+
image_subtoken,
|
341 |
+
image_tokens,
|
342 |
+
news_company,
|
343 |
+
text_model_name],
|
344 |
+
outputs=[progress_output,
|
345 |
+
log_output,
|
346 |
+
simulation_output_box,
|
347 |
+
saved_file,
|
348 |
+
example_image])
|
349 |
|
350 |
with gr.Row(elem_id="init_btn", visible=True) as init_btn:
|
351 |
submit_btn = gr.Button("Initialize Bot")
|
352 |
+
submt_process = submit_btn.click(init_app,
|
353 |
+
inputs=[api_key,
|
354 |
+
model_name,
|
355 |
+
model_class,
|
356 |
+
temperature,
|
357 |
+
diffusion_model,
|
358 |
+
keyword_model,
|
359 |
+
dtype,
|
360 |
+
topic_prompt],
|
361 |
+
outputs=[progress_output,
|
362 |
+
log_output,
|
363 |
+
main_block_step_1,
|
364 |
+
main_block_step_2,
|
365 |
+
init_btn,
|
366 |
+
run_sim_btn])
|
367 |
|
368 |
with gr.Row(elem_id="reset_block", visible=True) as reset_block:
|
369 |
reset_btn = gr.Button("Reset")
|
|
|
371 |
topic, topic_prompt, with_images, image_params,
|
372 |
main_block_step_1, main_block_step_2,
|
373 |
simulation_output_box,
|
374 |
+
run_sim_btn, init_btn], cancels=[submt_process])
|
375 |
|
376 |
with gr.Column(elem_id = "user_consent_container") as user_consent_block:
|
377 |
accept_checkbox = gr.Checkbox(visible=False)
|