Spaces:
Running
Running
Commit
·
41107fa
1
Parent(s):
72642d5
update
Browse files- app_utils.py +5 -1
- requirements.txt +1 -0
app_utils.py
CHANGED
@@ -2,6 +2,7 @@ import utils
|
|
2 |
import os
|
3 |
import math
|
4 |
import json
|
|
|
5 |
import numpy as np
|
6 |
import matplotlib.pyplot as plt
|
7 |
import mne
|
@@ -348,8 +349,11 @@ def mapping_result(stage1_info, channel_info, filename):
|
|
348 |
"batchNum" : batch_num,
|
349 |
"mappingResults" : results
|
350 |
}
|
|
|
|
|
|
|
351 |
with open(filename, 'w') as jsonfile:
|
352 |
-
jsonfile.write(
|
353 |
|
354 |
stage1_info.update({
|
355 |
"batchNum" : batch_num,
|
|
|
2 |
import os
|
3 |
import math
|
4 |
import json
|
5 |
+
import jsbeautifier
|
6 |
import numpy as np
|
7 |
import matplotlib.pyplot as plt
|
8 |
import mne
|
|
|
349 |
"batchNum" : batch_num,
|
350 |
"mappingResults" : results
|
351 |
}
|
352 |
+
options = jsbeautifier.default_options()
|
353 |
+
options.indent_size = 4
|
354 |
+
res = jsbeautifier.beautify(json.dumps(data), options)
|
355 |
with open(filename, 'w') as jsonfile:
|
356 |
+
jsonfile.write(res)
|
357 |
|
358 |
stage1_info.update({
|
359 |
"batchNum" : batch_num,
|
requirements.txt
CHANGED
@@ -18,3 +18,4 @@ typing_extensions==4.6.2
|
|
18 |
urllib3==2.0.2
|
19 |
mne==1.7.0
|
20 |
scikit-learn==1.5.1
|
|
|
|
18 |
urllib3==2.0.2
|
19 |
mne==1.7.0
|
20 |
scikit-learn==1.5.1
|
21 |
+
jsbeautifier==1.15.1
|