Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -452,7 +452,8 @@ def process_hdf5_file(uploaded_file, percentage):
|
|
452 |
channels = np.array(f['channels']).astype(np.complex64)
|
453 |
labels = np.array(f['labels']).astype(np.int32)
|
454 |
print(f"Loaded dataset with {channels.shape[0]} samples.")
|
455 |
-
|
|
|
456 |
# Step 7: Tokenize the data using the tokenizer from input_preprocess
|
457 |
preprocessed_chs = input_preprocess.tokenizer(manual_data=channels)
|
458 |
|
|
|
452 |
channels = np.array(f['channels']).astype(np.complex64)
|
453 |
labels = np.array(f['labels']).astype(np.int32)
|
454 |
print(f"Loaded dataset with {channels.shape[0]} samples.")
|
455 |
+
channels = channels * (10**(-3-np.floor(np.log10(np.abs(np.mean(channels).real)))))
|
456 |
+
|
457 |
# Step 7: Tokenize the data using the tokenizer from input_preprocess
|
458 |
preprocessed_chs = input_preprocess.tokenizer(manual_data=channels)
|
459 |
|