EvanTHU commited on
Commit
9678842
1 Parent(s): c17ab7c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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.update(choices=subset2_dirs), gr.Dropdown.update(choices=[])
103
 
104
  def update_videos(subset1, subset2):
105
  _, videos = get_next_level(os.path.join(root_dir, subset1, subset2))
106
- return gr.Dropdown.update(choices=videos)
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)