Datasets:
Tasks:
Image Classification
Modalities:
Image
Formats:
imagefolder
Languages:
English
Size:
1K - 10K
Tags:
art
License:
benjaminStreltzin
commited on
Commit
•
84a3fbf
1
Parent(s):
1c3623e
update
Browse files- dataset_ini.py +7 -9
dataset_ini.py
CHANGED
@@ -2,7 +2,7 @@ import pandas as pd
|
|
2 |
from datasets import Dataset, DatasetDict, concatenate_datasets
|
3 |
import os
|
4 |
|
5 |
-
def load_data(csv_file
|
6 |
df = pd.read_csv(csv_file)
|
7 |
# Update the image_path column to include the full path
|
8 |
df['label'] = df['label'].astype(int)
|
@@ -23,19 +23,17 @@ def load_dataset():
|
|
23 |
test_csv = 'test_labels.csv'
|
24 |
|
25 |
# Load datasets
|
26 |
-
|
27 |
|
28 |
-
train_dataset_fake = load_data(train_csv, training_fake)
|
29 |
|
30 |
-
# Combine datasets for training
|
31 |
-
train_dataset = concatenate_datasets([train_dataset_real, train_dataset_fake])
|
32 |
|
33 |
-
|
34 |
-
|
35 |
|
36 |
-
|
37 |
-
|
38 |
|
|
|
39 |
# Create DatasetDict
|
40 |
dataset_dict = DatasetDict({
|
41 |
'train': train_dataset,
|
|
|
2 |
from datasets import Dataset, DatasetDict, concatenate_datasets
|
3 |
import os
|
4 |
|
5 |
+
def load_data(csv_file):
|
6 |
df = pd.read_csv(csv_file)
|
7 |
# Update the image_path column to include the full path
|
8 |
df['label'] = df['label'].astype(int)
|
|
|
23 |
test_csv = 'test_labels.csv'
|
24 |
|
25 |
# Load datasets
|
26 |
+
train_dataset = load_data(train_csv)
|
27 |
|
|
|
28 |
|
|
|
|
|
29 |
|
30 |
+
# Combine datasets for training
|
31 |
+
|
32 |
|
33 |
+
test_dataset = load_data(test_csv)
|
34 |
+
|
35 |
|
36 |
+
|
37 |
# Create DatasetDict
|
38 |
dataset_dict = DatasetDict({
|
39 |
'train': train_dataset,
|