Datasets:

LukasHug commited on
Commit
29fef7d
1 Parent(s): f5d9d37

Update v-lol-trains.py

Browse files
Files changed (1) hide show
  1. v-lol-trains.py +1 -1
v-lol-trains.py CHANGED
@@ -6,7 +6,6 @@ import json
6
 
7
  import datasets
8
  from datasets.tasks import ImageClassification
9
- from sklearn.model_selection import train_test_split
10
 
11
  _CITATION = """
12
  @misc{helff2023vlol,
@@ -159,6 +158,7 @@ class vloltrains(datasets.GeneratorBasedBuilder):
159
  if self.config.metadata_urls['test'] is None:
160
  image_dir, y, images = self.get_data(dl_manager, self.config.metadata_urls['train'])
161
  image_dir_train, image_dir_test = image_dir, image_dir
 
162
  y_train, y_test, images_train, images_test = train_test_split(y, images, test_size=0.2, random_state=0)
163
  else:
164
  image_dir_train, y_train, images_train = self.get_data(dl_manager, self.config.metadata_urls['train'])
 
6
 
7
  import datasets
8
  from datasets.tasks import ImageClassification
 
9
 
10
  _CITATION = """
11
  @misc{helff2023vlol,
 
158
  if self.config.metadata_urls['test'] is None:
159
  image_dir, y, images = self.get_data(dl_manager, self.config.metadata_urls['train'])
160
  image_dir_train, image_dir_test = image_dir, image_dir
161
+ from sklearn.model_selection import train_test_split
162
  y_train, y_test, images_train, images_test = train_test_split(y, images, test_size=0.2, random_state=0)
163
  else:
164
  image_dir_train, y_train, images_train = self.get_data(dl_manager, self.config.metadata_urls['train'])