Spaces:
Sleeping
Sleeping
add utils fix
Browse filesin process dataset, add code handling added 'Test' column
- utils/utils.py +5 -1
utils/utils.py
CHANGED
@@ -520,7 +520,11 @@ def process_dataset_in_mem(embeddings_df: pd.DataFrame,
|
|
520 |
balanced_train_images = balanced_train_df['Images'].tolist()
|
521 |
|
522 |
# Convert test set back to numpy array and list
|
523 |
-
|
|
|
|
|
|
|
|
|
524 |
test_labels = test_df['Label'].tolist()
|
525 |
test_images = test_df['Images'].tolist()
|
526 |
|
|
|
520 |
balanced_train_images = balanced_train_df['Images'].tolist()
|
521 |
|
522 |
# Convert test set back to numpy array and list
|
523 |
+
if 'Test' in test_df:
|
524 |
+
test_embeddings = test_df.drop(columns=['Label', 'Images', 'Test']).to_numpy()
|
525 |
+
else:
|
526 |
+
test_embeddings = test_df.drop(columns=['Label', 'Images']).to_numpy()
|
527 |
+
|
528 |
test_labels = test_df['Label'].tolist()
|
529 |
test_images = test_df['Images'].tolist()
|
530 |
|