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

Fix: Error message when not filling emotion or confidence

Browse files
__pycache__/load_and_save.cpython-310.pyc CHANGED
Binary files a/__pycache__/load_and_save.cpython-310.pyc and b/__pycache__/load_and_save.cpython-310.pyc differ
 
__pycache__/text_explanations.cpython-310.pyc CHANGED
Binary files a/__pycache__/text_explanations.cpython-310.pyc and b/__pycache__/text_explanations.cpython-310.pyc differ
 
__pycache__/utils.cpython-310.pyc CHANGED
Binary files a/__pycache__/utils.cpython-310.pyc and b/__pycache__/utils.cpython-310.pyc differ
 
load_and_save.py CHANGED
@@ -17,7 +17,7 @@ persistent_storage = Path('/data')
17
  password_files = os.getenv("password_files")
18
 
19
  if os.path.exists(f'{persistent_storage}/possible_ids.pkl'):
20
- with open(f'{persistent_storage}/possible_ids.pkl', 'wb') as f:
21
  possible_ids = pickle.load(f)
22
  else:
23
  possible_ids = {}
@@ -184,11 +184,10 @@ def next_example(annotations_df, file_list_df, emotions, confidence, comments, n
184
  annotations_df, ann_completed = save_annotation(annotations_df, file_list_df, emotions, confidence, comments, n_clicks, participant_id, ann_completed, current_index)
185
  if current_index < len(file_list_df):
186
  current_index += 1
187
- sentence, audio_path, emotion, confidence, comments, n_clicks, start, end, duration = load_example(annotations_df, file_list_df, current_index)
188
-
189
  else:
190
  gr.Warning("This is the last example, well done!")
191
  print(f'current_index {current_index}')
 
192
 
193
  return annotations_df, sentence, audio_path, emotion, confidence, comments, n_clicks, start, end, duration, ann_completed, current_index
194
 
 
17
  password_files = os.getenv("password_files")
18
 
19
  if os.path.exists(f'{persistent_storage}/possible_ids.pkl'):
20
+ with open(f'{persistent_storage}/possible_ids.pkl', 'rb') as f:
21
  possible_ids = pickle.load(f)
22
  else:
23
  possible_ids = {}
 
184
  annotations_df, ann_completed = save_annotation(annotations_df, file_list_df, emotions, confidence, comments, n_clicks, participant_id, ann_completed, current_index)
185
  if current_index < len(file_list_df):
186
  current_index += 1
 
 
187
  else:
188
  gr.Warning("This is the last example, well done!")
189
  print(f'current_index {current_index}')
190
+ sentence, audio_path, emotion, confidence, comments, n_clicks, start, end, duration = load_example(annotations_df, file_list_df, current_index)
191
 
192
  return annotations_df, sentence, audio_path, emotion, confidence, comments, n_clicks, start, end, duration, ann_completed, current_index
193