Spaces:
Sleeping
Sleeping
Commit
·
3ab4789
1
Parent(s):
84330fe
update app.py
Browse files
app.py
CHANGED
@@ -5,19 +5,15 @@ import utils
|
|
5 |
from pathlib import Path
|
6 |
|
7 |
def test(csv_file):
|
8 |
-
|
9 |
|
10 |
-
|
|
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
d_data = d_data[0]
|
17 |
-
|
18 |
-
utils.save_data(d_data, tmp_file_path+"/EEGART_test.csv")
|
19 |
-
|
20 |
-
return tmp_file_path+"/EEGART_test.csv"
|
21 |
|
22 |
app = gr.Interface(fn=test,
|
23 |
inputs=gr.File(label="CSV file", file_types=[".csv"]),
|
|
|
5 |
from pathlib import Path
|
6 |
|
7 |
def test(csv_file):
|
8 |
+
tmp_filepath = str(Path(str(csv_file)).parent)
|
9 |
|
10 |
+
# step1: Data preprocessing
|
11 |
+
total_file_num = utils.preprocessing(csv_file, 256)
|
12 |
|
13 |
+
# step2: Signal reconstruction
|
14 |
+
utils.reconstruct("EEGART", total_file_num, tmp_filepath, "EEGART_test.csv")
|
15 |
+
|
16 |
+
return tmp_filepath+"/EEGART_test.csv"
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
app = gr.Interface(fn=test,
|
19 |
inputs=gr.File(label="CSV file", file_types=[".csv"]),
|