fpessanha commited on
Commit
cf00896
·
1 Parent(s): 2bb5561

Fix: Implement state to number for sidebar

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -157,8 +157,12 @@ with (gr.Blocks(theme=gr.themes.Soft(), css = css) as demo):
157
 
158
  audio_player.play(count_clicks, [n_clicks], [n_clicks])
159
 
160
- sidebar.collapse(None, [], [start, end, duration, current_index, ann_completed, total], js = js_progress_bar)
161
- sidebar.expand(None, [], [start, end, duration, current_index,ann_completed, total], js = js_progress_bar)
 
 
 
 
162
 
163
 
164
  with gr.Tab("Access Files"):
 
157
 
158
  audio_player.play(count_clicks, [n_clicks], [n_clicks])
159
 
160
+ sidebar.collapse(None, [], [start, end, duration, current_index, ann_completed, total]).then(state_to_number, [start, end, duration, current_index, ann_completed, total],
161
+ [start_temp, end_temp, duration_temp, current_index_temp, ann_completed_temp, total_temp]).then(None, [], [start_temp, end_temp, duration_temp, current_index_temp, ann_completed_temp, total_temp], js = js_progress_bar)
162
+
163
+ sidebar.expand(None, [], [start, end, duration, current_index,ann_completed, total]).then(state_to_number, [start, end, duration, current_index, ann_completed, total],
164
+ [start_temp, end_temp, duration_temp, current_index_temp, ann_completed_temp, total_temp]).then(None, [], [start_temp, end_temp, duration_temp, current_index_temp, ann_completed_temp, total_temp], js = js_progress_bar)
165
+
166
 
167
 
168
  with gr.Tab("Access Files"):