Spaces:
Running
Running
Sadjad Alikhani
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ RAW_PATH = os.path.join("images", "raw")
|
|
| 16 |
EMBEDDINGS_PATH = os.path.join("images", "embeddings")
|
| 17 |
|
| 18 |
# Specific values for percentage of data for training
|
| 19 |
-
percentage_values = np.arange(
|
| 20 |
|
| 21 |
# Custom class to capture print output
|
| 22 |
class PrintCapture(io.StringIO):
|
|
@@ -220,6 +220,8 @@ def process_hdf5_file(uploaded_file, percentage_idx):
|
|
| 220 |
print(f"Output Embeddings Shape: {output_emb.shape}")
|
| 221 |
print(f"Output Raw Shape: {output_raw.shape}")
|
| 222 |
|
|
|
|
|
|
|
| 223 |
train_data_emb, test_data_emb, train_data_raw, test_data_raw, train_labels, test_labels = identical_train_test_split(output_emb.view(len(output_emb),-1),
|
| 224 |
output_raw.view(len(output_raw),-1),
|
| 225 |
labels,
|
|
|
|
| 16 |
EMBEDDINGS_PATH = os.path.join("images", "embeddings")
|
| 17 |
|
| 18 |
# Specific values for percentage of data for training
|
| 19 |
+
percentage_values = np.arange(9) + 1
|
| 20 |
|
| 21 |
# Custom class to capture print output
|
| 22 |
class PrintCapture(io.StringIO):
|
|
|
|
| 220 |
print(f"Output Embeddings Shape: {output_emb.shape}")
|
| 221 |
print(f"Output Raw Shape: {output_raw.shape}")
|
| 222 |
|
| 223 |
+
print(f'percentage_idx: {percentage_idx}')
|
| 224 |
+
print(f'percentage_value: {percentage_values[percentage_idx]*10}')
|
| 225 |
train_data_emb, test_data_emb, train_data_raw, test_data_raw, train_labels, test_labels = identical_train_test_split(output_emb.view(len(output_emb),-1),
|
| 226 |
output_raw.view(len(output_raw),-1),
|
| 227 |
labels,
|