Datasets:

ArXiv:
License:
AlexKoff88 commited on
Commit
d881699
1 Parent(s): 41ea0e3

Replaced google drive with HF Hub as a source for files

Browse files
Files changed (1) hide show
  1. feedbackQA.py +10 -12
feedbackQA.py CHANGED
@@ -35,13 +35,13 @@ It has two parts: the first part contains a conventional RQA dataset, \
35
  whilst this repo contains the second part, which contains feedback(ratings and natural language explanations) for QA pairs.
36
  """
37
 
38
- #_URLS = {
39
- # "train": "https://cdn-lfs.huggingface.co/datasets/McGill-NLP/FeedbackQA/46bd763229fc603d73f634a312367acb83c3b713a5dfd9fcf8a9b3e310c39a67",
40
- # "dev": "https://cdn-lfs.huggingface.co/datasets/McGill-NLP/FeedbackQA/40a93282e5fdee4706c20e32ddd4734151139d67f6844dbcffb9e7be22ae6b8f",
41
- # "test": "https://cdn-lfs.huggingface.co/datasets/McGill-NLP/FeedbackQA/50c4a21dc778cf064f731161e2213f21d2951cabd9331a1c524f791055040d02"
42
- #}
 
43
 
44
- _URL = 'https://drive.google.com/uc?export=download&id=14KV6yKgdjzb6fbFzshGuNvEp9zGv_gol'
45
 
46
  class FeedbackConfig(datasets.BuilderConfig):
47
  """BuilderConfig for FeedbackQA."""
@@ -91,11 +91,9 @@ class FeedbackQA(datasets.GeneratorBasedBuilder):
91
  )
92
 
93
  def _split_generators(self, dl_manager):
94
- downloaded_files_path = dl_manager.download_and_extract(_URL)
95
- train_file = os.path.join(downloaded_files_path, 'feedback_train.json')
96
- val_file = os.path.join(downloaded_files_path, 'feedback_valid.json')
97
- test_file = os.path.join(downloaded_files_path, 'feedback_test.json')
98
- print(test_file)
99
  return [
100
  datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train_file}),
101
  datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": val_file}),
@@ -126,4 +124,4 @@ class FeedbackQA(datasets.GeneratorBasedBuilder):
126
  "explanation": dict_item['feedback'],
127
  },
128
  }
129
- key += 1
 
35
  whilst this repo contains the second part, which contains feedback(ratings and natural language explanations) for QA pairs.
36
  """
37
 
38
+ #_URL = 'https://drive.google.com/uc?export=download&id=14KV6yKgdjzb6fbFzshGuNvEp9zGv_gol'
39
+ _URLS = {
40
+ "train": "https://huggingface.co/datasets/McGill-NLP/feedbackQA/resolve/main/data/feedback_train.json",
41
+ "val": "https://huggingface.co/datasets/McGill-NLP/feedbackQA/resolve/main/data/feedback_valid.json",
42
+ "test": "https://huggingface.co/datasets/McGill-NLP/feedbackQA/resolve/main/data/feedback_test.json"
43
+ }
44
 
 
45
 
46
  class FeedbackConfig(datasets.BuilderConfig):
47
  """BuilderConfig for FeedbackQA."""
 
91
  )
92
 
93
  def _split_generators(self, dl_manager):
94
+ train_file = dl_manager.download(_URLS["train"])
95
+ val_file = dl_manager.download(_URLS["val"])
96
+ test_file = dl_manager.download(_URLS["test"])
 
 
97
  return [
98
  datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train_file}),
99
  datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": val_file}),
 
124
  "explanation": dict_item['feedback'],
125
  },
126
  }
127
+ key += 1