fpessanha commited on
Commit
6bce7e0
·
1 Parent(s): 7bd2a1d

Fix: Update instructions and sidebar issue

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -224,6 +224,7 @@ start_annotating = """<h2>How to use the annotation interface?</h2>
224
  When you finish all annotations, please send an email to <a href="mailto:f.pessanha@uu.nl">f.pessanha@uu.nl</a>.
225
  </li>
226
  </ol>
 
227
  <div style="text-align: center; padding: 1.5em 0;">
228
  <p><strong>Below you can find an overview of the annotation interface.</strong></p>
229
  </div>
@@ -401,7 +402,7 @@ with (gr.Blocks(theme=gr.themes.Soft(), css = css) as demo):
401
  annotations = pd.DataFrame(columns=['sample_id', 'sentence', 'emotion', 'confidence', 'comments', 'n_clicks'])
402
 
403
  # Instructions for emotion annotation
404
- with gr.Sidebar(open = False):
405
  participant_id = gr.Textbox(label='What is your participant ID?', interactive = True)
406
  lets_go = gr.Button("Let's go!")
407
  cheat_sheet = gr.HTML(side_bar_html, padding = False)
@@ -494,6 +495,10 @@ with (gr.Blocks(theme=gr.themes.Soft(), css = css) as demo):
494
  data = [sentence_text, audio_player, emotions, confidence, comments]
495
  lets_go.click(deactivate_participant_id, [participant_id, lets_go, total, *buttons, *data, n_clicks, ann_completed, current_index], [participant_id, lets_go, total, *buttons, *data, n_clicks, start, end, duration, ann_completed, current_index]).then( None, [], [start, end, duration, current_index, ann_completed, total], js = js_progress_bar)
496
  audio_player.play(count_clicks, [n_clicks], [n_clicks])
 
 
 
 
497
 
498
  with gr.Tab("Access Files"):
499
 
 
224
  When you finish all annotations, please send an email to <a href="mailto:f.pessanha@uu.nl">f.pessanha@uu.nl</a>.
225
  </li>
226
  </ol>
227
+ <p><strong>Note:</strong> You can click on any part of the audio to start playing from that point. Please avoid clicking on the audio while it is playing (pause it first). This will not affect the program, but it will help us understand how you interact with the interface.</p>
228
  <div style="text-align: center; padding: 1.5em 0;">
229
  <p><strong>Below you can find an overview of the annotation interface.</strong></p>
230
  </div>
 
402
  annotations = pd.DataFrame(columns=['sample_id', 'sentence', 'emotion', 'confidence', 'comments', 'n_clicks'])
403
 
404
  # Instructions for emotion annotation
405
+ with gr.Sidebar(open = False) as sidebar:
406
  participant_id = gr.Textbox(label='What is your participant ID?', interactive = True)
407
  lets_go = gr.Button("Let's go!")
408
  cheat_sheet = gr.HTML(side_bar_html, padding = False)
 
495
  data = [sentence_text, audio_player, emotions, confidence, comments]
496
  lets_go.click(deactivate_participant_id, [participant_id, lets_go, total, *buttons, *data, n_clicks, ann_completed, current_index], [participant_id, lets_go, total, *buttons, *data, n_clicks, start, end, duration, ann_completed, current_index]).then( None, [], [start, end, duration, current_index, ann_completed, total], js = js_progress_bar)
497
  audio_player.play(count_clicks, [n_clicks], [n_clicks])
498
+
499
+ sidebar.collapse(None, [], [start, end, duration, current_index,ann_completed, total], js = js_progress_bar)
500
+ sidebar.expand(None, [], [start, end, duration, current_index,ann_completed, total], js = js_progress_bar)
501
+
502
 
503
  with gr.Tab("Access Files"):
504