benjaminStreltzin commited on
Commit
f3f157e
·
1 Parent(s): 02ff176
Files changed (1) hide show
  1. dataset_ini.py +1 -0
dataset_ini.py CHANGED
@@ -6,6 +6,7 @@ def load_data(csv_file, images_folder):
6
  df = pd.read_csv(csv_file)
7
  # Update the image_path column to include the full path
8
  df['image_path'] = df['image_path'].apply(lambda x: os.path.join(images_folder, x))
 
9
  dataset = Dataset.from_pandas(df)
10
  return dataset
11
 
 
6
  df = pd.read_csv(csv_file)
7
  # Update the image_path column to include the full path
8
  df['image_path'] = df['image_path'].apply(lambda x: os.path.join(images_folder, x))
9
+ df['label'] = df['label'].astype(int)
10
  dataset = Dataset.from_pandas(df)
11
  return dataset
12