quantumiracle-git commited on
Commit
dfc0cb3
·
1 Parent(s): 4496485

Update hfserver.py

Browse files
Files changed (1) hide show
  1. hfserver.py +7 -10
hfserver.py CHANGED
@@ -320,17 +320,14 @@ class HuggingFaceDatasetSaver(FlaggingCallback):
320
  # Generate the row corresponding to the flagged sample
321
  csv_data = []
322
  for component, sample in zip(self.components, flag_data):
323
- try:
324
- filepath = component.save_flagged(
325
- self.dataset_dir, component.label, sample, None
 
 
 
 
326
  )
327
- csv_data.append(filepath)
328
- if isinstance(component, tuple(file_preview_types)):
329
- csv_data.append(
330
- "{}/resolve/main/{}".format(self.path_to_dataset_repo, filepath)
331
- )
332
- except:
333
- pass
334
  csv_data.append(flag_option if flag_option is not None else "")
335
  writer.writerow(csv_data)
336
 
 
320
  # Generate the row corresponding to the flagged sample
321
  csv_data = []
322
  for component, sample in zip(self.components, flag_data):
323
+ filepath = component.save_flagged(
324
+ self.dataset_dir, component.label, sample, None
325
+ )
326
+ csv_data.append(filepath)
327
+ if isinstance(component, tuple(file_preview_types)):
328
+ csv_data.append(
329
+ "{}/resolve/main/{}".format(self.path_to_dataset_repo, filepath)
330
  )
 
 
 
 
 
 
 
331
  csv_data.append(flag_option if flag_option is not None else "")
332
  writer.writerow(csv_data)
333