arcleife commited on
Commit
0799b2b
·
verified ·
1 Parent(s): 4b95252

Update hf_dataset_saver.py

Browse files
Files changed (1) hide show
  1. hf_dataset_saver.py +13 -0
hf_dataset_saver.py CHANGED
@@ -1,3 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  class HuggingFaceDatasetSaver(FlaggingCallback):
2
  """
3
  A callback that saves each flagged sample (both the input and output data) to a HuggingFace dataset.
 
1
+ # version: 0.2.1
2
+
3
+ from gradio import FlaggingCallback, utils
4
+ from collections import OrderedDict
5
+ from gradio.components import Component
6
+ from gradio_client import utils as client_utils
7
+ from typing import Sequence, Any
8
+ from pathlib import Path
9
+ import huggingface_hub
10
+ import uuid
11
+ import filelock
12
+ import csv
13
+
14
  class HuggingFaceDatasetSaver(FlaggingCallback):
15
  """
16
  A callback that saves each flagged sample (both the input and output data) to a HuggingFace dataset.