478841
This commit is contained in:
parent
ff2f2b124f
commit
89e8437381
3
run.py
3
run.py
@ -7,7 +7,6 @@ import lzma
|
||||
|
||||
def read_file(f_name, f_ext=""):
|
||||
if f_ext == "xz":
|
||||
# data = []
|
||||
with lzma.open(f"{f_name}.{f_ext}") as file:
|
||||
return [line.strip().decode("utf-8") for line in file.readlines()]
|
||||
with open(f_name, encoding="utf-8") as file:
|
||||
@ -15,7 +14,7 @@ def read_file(f_name, f_ext=""):
|
||||
|
||||
|
||||
def write_file(dir_name, preds):
|
||||
with open(f"{dir_name}\out.tsv", "a", encoding="utf-8") as file_out:
|
||||
with open(f"{dir_name}/out.tsv", "a", encoding="utf-8") as file_out:
|
||||
for val in preds:
|
||||
file_out.writelines(f"{str(val)}")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user