OfekGlick commited on
Commit
533365c
1 Parent(s): 4fb73a0

Upload DiscoEval.py

Browse files
Files changed (1) hide show
  1. DiscoEval.py +5 -4
DiscoEval.py CHANGED
@@ -18,7 +18,7 @@ import datasets
18
  import constants
19
  import pickle
20
  import logging
21
- from huggingface_hub import snapshot_download, hf_hub_url
22
 
23
  _CITATION = """\
24
  @InProceedings{mchen-discoeval-19,
@@ -187,18 +187,19 @@ class DiscoEvalSentence(datasets.GeneratorBasedBuilder):
187
  if self.config.name in [constants.SPARXIV, constants.SPROCSTORY, constants.SPWIKI]:
188
  subfolder = os.path.join(constants.SP_DATA_DIR, constants.SP_DIRS[self.config.name])
189
  data_dir = subfolder
190
- hf_hub_url(
191
  repo_id="OfekGlick/DiscoEval",
192
  filename=constants.SP_TRAIN_NAME,
193
  subfolder=subfolder)
194
- hf_hub_url(
195
  repo_id="OfekGlick/DiscoEval",
196
  filename=constants.SP_VALID_NAME,
197
  subfolder=subfolder)
198
- hf_hub_url(
199
  repo_id="OfekGlick/DiscoEval",
200
  filename=constants.SP_TEST_NAME,
201
  subfolder=subfolder)
 
202
  train_name = constants.SP_TRAIN_NAME
203
  valid_name = constants.SP_VALID_NAME
204
  test_name = constants.SP_TEST_NAME
 
18
  import constants
19
  import pickle
20
  import logging
21
+ from huggingface_hub import snapshot_download, hf_hub_url, hf_hub_download
22
 
23
  _CITATION = """\
24
  @InProceedings{mchen-discoeval-19,
 
187
  if self.config.name in [constants.SPARXIV, constants.SPROCSTORY, constants.SPWIKI]:
188
  subfolder = os.path.join(constants.SP_DATA_DIR, constants.SP_DIRS[self.config.name])
189
  data_dir = subfolder
190
+ train_url = hf_hub_download(
191
  repo_id="OfekGlick/DiscoEval",
192
  filename=constants.SP_TRAIN_NAME,
193
  subfolder=subfolder)
194
+ valid_url = hf_hub_download(
195
  repo_id="OfekGlick/DiscoEval",
196
  filename=constants.SP_VALID_NAME,
197
  subfolder=subfolder)
198
+ text_url = hf_hub_download(
199
  repo_id="OfekGlick/DiscoEval",
200
  filename=constants.SP_TEST_NAME,
201
  subfolder=subfolder)
202
+ data_dir = dl_manager.download_and_extract(urls)
203
  train_name = constants.SP_TRAIN_NAME
204
  valid_name = constants.SP_VALID_NAME
205
  test_name = constants.SP_TEST_NAME