Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -112,7 +112,7 @@ def display_videos(type, prompt, model_name_1, model_name_2):
|
|
| 112 |
with gr.Blocks() as interface:
|
| 113 |
type_output = gr.Dropdown(label="Type", choices=types, value=types[0])
|
| 114 |
prompt_output = gr.Dropdown(label="Prompt", choices=dimension[types[0]], value=dimension[types[0]][0])
|
| 115 |
-
|
| 116 |
with gr.Row():
|
| 117 |
random_button = gr.Button("🎲 Random 2 videos")
|
| 118 |
display_button = gr.Button("⏸ Play options")
|
|
@@ -130,11 +130,11 @@ with gr.Blocks() as interface:
|
|
| 130 |
|
| 131 |
random_button.click(
|
| 132 |
fn=get_random_video,
|
| 133 |
-
outputs=[video_output_1, video_output_2,model_name_1_output, model_name_2_output, type_output,
|
| 134 |
).then(fn=update_prompt_options,
|
| 135 |
inputs=[type_output],
|
| 136 |
outputs=[prompt_output]).then(fn=update_prompt_options,
|
| 137 |
-
inputs=[type_output,
|
| 138 |
outputs=[prompt_output])
|
| 139 |
|
| 140 |
|
|
|
|
| 112 |
with gr.Blocks() as interface:
|
| 113 |
type_output = gr.Dropdown(label="Type", choices=types, value=types[0])
|
| 114 |
prompt_output = gr.Dropdown(label="Prompt", choices=dimension[types[0]], value=dimension[types[0]][0])
|
| 115 |
+
prompt_placeholder = gr.State()
|
| 116 |
with gr.Row():
|
| 117 |
random_button = gr.Button("🎲 Random 2 videos")
|
| 118 |
display_button = gr.Button("⏸ Play options")
|
|
|
|
| 130 |
|
| 131 |
random_button.click(
|
| 132 |
fn=get_random_video,
|
| 133 |
+
outputs=[video_output_1, video_output_2,model_name_1_output, model_name_2_output, type_output, prompt_placeholder]
|
| 134 |
).then(fn=update_prompt_options,
|
| 135 |
inputs=[type_output],
|
| 136 |
outputs=[prompt_output]).then(fn=update_prompt_options,
|
| 137 |
+
inputs=[type_output,prompt_placeholder],
|
| 138 |
outputs=[prompt_output])
|
| 139 |
|
| 140 |
|