Update app.py
Browse files
app.py
CHANGED
@@ -99,11 +99,11 @@ def create_demo():
|
|
99 |
|
100 |
def update_subset2(subset1):
|
101 |
subset2_dirs, _ = get_next_level(os.path.join(root_dir, subset1))
|
102 |
-
return gr.Dropdown
|
103 |
|
104 |
def update_videos(subset1, subset2):
|
105 |
_, videos = get_next_level(os.path.join(root_dir, subset1, subset2))
|
106 |
-
return gr.Dropdown
|
107 |
|
108 |
subset1.change(update_subset2, inputs=subset1, outputs=[subset2, video])
|
109 |
subset2.change(update_videos, inputs=[subset1, subset2], outputs=video)
|
|
|
99 |
|
100 |
def update_subset2(subset1):
|
101 |
subset2_dirs, _ = get_next_level(os.path.join(root_dir, subset1))
|
102 |
+
return gr.Dropdown(choices=subset2_dirs, nteractive=True), gr.Dropdown(choices=[], interactive=True)
|
103 |
|
104 |
def update_videos(subset1, subset2):
|
105 |
_, videos = get_next_level(os.path.join(root_dir, subset1, subset2))
|
106 |
+
return gr.Dropdown(choices=videos, interactive=True)
|
107 |
|
108 |
subset1.change(update_subset2, inputs=subset1, outputs=[subset2, video])
|
109 |
subset2.change(update_videos, inputs=[subset1, subset2], outputs=video)
|