Spaces:
Sleeping
Sleeping
Commit ·
eb7f3de
1
Parent(s): 43d28b1
update
Browse files
utils.py
CHANGED
|
@@ -106,8 +106,7 @@ def glue_data(file_name, total, output):
|
|
| 106 |
def save_data(data, filename):
|
| 107 |
with open(filename, 'w', newline='') as csvfile:
|
| 108 |
writer = csv.writer(csvfile)
|
| 109 |
-
|
| 110 |
-
writer.writerow(row)
|
| 111 |
|
| 112 |
def dataDelete(path):
|
| 113 |
try:
|
|
@@ -223,10 +222,12 @@ def reconstruct(model_name, total, filepath, outputfile):
|
|
| 223 |
|
| 224 |
# Deep Learning Artifact Removal
|
| 225 |
d_data = decode_data(data_noise, std, model_name)
|
| 226 |
-
d_data = d_data[0]
|
| 227 |
|
| 228 |
outputname = filepath + '/temp2/output{}.csv'.format(str(i))
|
| 229 |
save_data(d_data, outputname)
|
|
|
|
|
|
|
| 230 |
|
| 231 |
# --------------------glue_data----------------------------
|
| 232 |
glue_data(filepath+"/temp2/", total, filepath+'/'+outputfile)
|
|
|
|
| 106 |
def save_data(data, filename):
|
| 107 |
with open(filename, 'w', newline='') as csvfile:
|
| 108 |
writer = csv.writer(csvfile)
|
| 109 |
+
writer.writerows(data)
|
|
|
|
| 110 |
|
| 111 |
def dataDelete(path):
|
| 112 |
try:
|
|
|
|
| 222 |
|
| 223 |
# Deep Learning Artifact Removal
|
| 224 |
d_data = decode_data(data_noise, std, model_name)
|
| 225 |
+
#d_data = d_data[0]
|
| 226 |
|
| 227 |
outputname = filepath + '/temp2/output{}.csv'.format(str(i))
|
| 228 |
save_data(d_data, outputname)
|
| 229 |
+
#d_data.to_csv(outputname, index=False)
|
| 230 |
+
|
| 231 |
|
| 232 |
# --------------------glue_data----------------------------
|
| 233 |
glue_data(filepath+"/temp2/", total, filepath+'/'+outputfile)
|