Francisco Castillo commited on
Commit
7635d84
1 Parent(s): d4ededc
Files changed (1) hide show
  1. reviews_with_drift.py +1 -1
reviews_with_drift.py CHANGED
@@ -152,7 +152,7 @@ class ReviewsWithDrift(datasets.GeneratorBasedBuilder):
152
  # TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
153
  # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
154
  label_mapping = {"Positive": 1, "Negative": 0}
155
- with open(filepath, encoding="utf-8") as csv_file:
156
  csv_reader = csv.reader(csv_file)
157
  for id_, row in enumerate(csv_reader):
158
  prediction_ts,age,gender,context,text,label = row
 
152
  # TODO: This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
153
  # The `key` is for legacy reasons (tfds) and is not important in itself, but must be unique for each example.
154
  label_mapping = {"Positive": 1, "Negative": 0}
155
+ with open(filepath) as csv_file:
156
  csv_reader = csv.reader(csv_file)
157
  for id_, row in enumerate(csv_reader):
158
  prediction_ts,age,gender,context,text,label = row