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