cathw commited on
Commit
3fa893d
1 Parent(s): 57f4032

Upload reddit_climate_comment.py

Browse files
Files changed (1) hide show
  1. reddit_climate_comment.py +2 -2
reddit_climate_comment.py CHANGED
@@ -54,8 +54,8 @@ class NewDataset(GeneratorBasedBuilder):
54
  path = dl_manager.download_and_extract(_URL)
55
  train_splits = SplitGenerator(name=Split.TRAIN, gen_kwargs={"filepath": path+"/climate_comments.json"})
56
  return [train_splits]
57
- def _generate_examples(self, path):
58
- with open(path, encoding="utf-8") as f:
59
  data = json.load(f)
60
 
61
  for post in data["Posts"]:
 
54
  path = dl_manager.download_and_extract(_URL)
55
  train_splits = SplitGenerator(name=Split.TRAIN, gen_kwargs={"filepath": path+"/climate_comments.json"})
56
  return [train_splits]
57
+ def _generate_examples(self, filepath):
58
+ with open(filepath, encoding="utf-8") as f:
59
  data = json.load(f)
60
 
61
  for post in data["Posts"]: