quantumiracle-git commited on
Commit
f18b79d
1 Parent(s): ede8743

Update hfserver.py

Browse files
Files changed (1) hide show
  1. hfserver.py +4 -1
hfserver.py CHANGED
@@ -381,7 +381,10 @@ class HuggingFaceDatasetSaver(FlaggingCallback):
381
  utils.strip_invalid_filename_characters(component.label),
382
  )
383
  # filepath = component.deserialize(sample, save_dir, None)
384
- filepath = component.deserialize(sample, save_dir, None) if sample is not None and str(component)!='image' else "" # not save image
 
 
 
385
  csv_data.append(filepath)
386
  if isinstance(component, tuple(file_preview_types)):
387
  csv_data.append(
 
381
  utils.strip_invalid_filename_characters(component.label),
382
  )
383
  # filepath = component.deserialize(sample, save_dir, None)
384
+ if sample is not None and str(component)!='image':
385
+ filepath = component.deserialize(sample, save_dir, None)
386
+ else:
387
+ filepath = component.deserialize(sample, None, None) # not saving image
388
  csv_data.append(filepath)
389
  if isinstance(component, tuple(file_preview_types)):
390
  csv_data.append(