Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -388,6 +388,7 @@ def identical_train_test_split(output_emb, output_raw, labels, train_percentage)
|
|
388 |
remaining_indices = indices[test_split_index:]
|
389 |
train_split_index = int(len(remaining_indices) * train_percentage / 100)
|
390 |
print(f'Training Size: {train_split_index} out of remaining {len(remaining_indices)}')
|
|
|
391 |
|
392 |
train_indices = remaining_indices[:train_split_index]
|
393 |
|
@@ -471,9 +472,9 @@ def process_hdf5_file(uploaded_file, percentage):
|
|
471 |
percentage)
|
472 |
|
473 |
# Step 8: Perform classification using the Euclidean distance for both raw and embeddings
|
474 |
-
print(f'train_data_emb: {train_data_emb.shape}')
|
475 |
-
print(f'train_labels: {train_labels.shape}')
|
476 |
-
print(f'test_data_emb: {test_data_emb.shape}')
|
477 |
pred_raw = classify_based_on_distance(train_data_raw, train_labels, test_data_raw)
|
478 |
pred_emb = classify_based_on_distance(train_data_emb, train_labels, test_data_emb)
|
479 |
|
|
|
388 |
remaining_indices = indices[test_split_index:]
|
389 |
train_split_index = int(len(remaining_indices) * train_percentage / 100)
|
390 |
print(f'Training Size: {train_split_index} out of remaining {len(remaining_indices)}')
|
391 |
+
print(f'Test Size: {test_split_index}')
|
392 |
|
393 |
train_indices = remaining_indices[:train_split_index]
|
394 |
|
|
|
472 |
percentage)
|
473 |
|
474 |
# Step 8: Perform classification using the Euclidean distance for both raw and embeddings
|
475 |
+
#print(f'train_data_emb: {train_data_emb.shape}')
|
476 |
+
#print(f'train_labels: {train_labels.shape}')
|
477 |
+
#print(f'test_data_emb: {test_data_emb.shape}')
|
478 |
pred_raw = classify_based_on_distance(train_data_raw, train_labels, test_data_raw)
|
479 |
pred_emb = classify_based_on_distance(train_data_emb, train_labels, test_data_emb)
|
480 |
|