Spaces:
Runtime error
Runtime error
Change layout
Browse files
app.py
CHANGED
|
@@ -35,9 +35,6 @@ def create_advanced_demo(model: Model) -> gr.Blocks:
|
|
| 35 |
maximum=maximum,
|
| 36 |
value=20)
|
| 37 |
|
| 38 |
-
def show_denoising_changed(selected: bool) -> dict:
|
| 39 |
-
return gr.Video.update(visible=selected)
|
| 40 |
-
|
| 41 |
with gr.Blocks() as demo:
|
| 42 |
gr.Markdown(DESCRIPTION)
|
| 43 |
|
|
@@ -63,23 +60,19 @@ def create_advanced_demo(model: Model) -> gr.Blocks:
|
|
| 63 |
step=1,
|
| 64 |
value=1234,
|
| 65 |
label='Seed')
|
| 66 |
-
show_denoising = gr.Checkbox(value=False,
|
| 67 |
-
label='Show Denoising')
|
| 68 |
run_button = gr.Button('Run')
|
| 69 |
with gr.Column():
|
| 70 |
-
with gr.
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
|
|
|
| 75 |
|
| 76 |
scheduler_type.change(fn=update_num_steps,
|
| 77 |
inputs=scheduler_type,
|
| 78 |
outputs=num_steps,
|
| 79 |
queue=False)
|
| 80 |
-
show_denoising.change(fn=show_denoising_changed,
|
| 81 |
-
inputs=show_denoising,
|
| 82 |
-
outputs=result_video)
|
| 83 |
run_button.click(fn=model.run,
|
| 84 |
inputs=[
|
| 85 |
model_name,
|
|
|
|
| 35 |
maximum=maximum,
|
| 36 |
value=20)
|
| 37 |
|
|
|
|
|
|
|
|
|
|
| 38 |
with gr.Blocks() as demo:
|
| 39 |
gr.Markdown(DESCRIPTION)
|
| 40 |
|
|
|
|
| 60 |
step=1,
|
| 61 |
value=1234,
|
| 62 |
label='Seed')
|
|
|
|
|
|
|
| 63 |
run_button = gr.Button('Run')
|
| 64 |
with gr.Column():
|
| 65 |
+
with gr.Tabs():
|
| 66 |
+
with gr.TabItem('Result'):
|
| 67 |
+
result = gr.Image(show_label=False, elem_id='result')
|
| 68 |
+
with gr.TabItem('Denoising Process'):
|
| 69 |
+
result_video = gr.Video(show_label=False,
|
| 70 |
+
elem_id='result-video')
|
| 71 |
|
| 72 |
scheduler_type.change(fn=update_num_steps,
|
| 73 |
inputs=scheduler_type,
|
| 74 |
outputs=num_steps,
|
| 75 |
queue=False)
|
|
|
|
|
|
|
|
|
|
| 76 |
run_button.click(fn=model.run,
|
| 77 |
inputs=[
|
| 78 |
model_name,
|