From 8337be9194d1e34529d55f957a462d5d7ce0ed71 Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Fri, 4 Oct 2024 01:40:25 +0800 Subject: [PATCH] Update GAT.py --- py/GAT.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/GAT.py b/py/GAT.py index 34bf75a..9e842ff 100644 --- a/py/GAT.py +++ b/py/GAT.py @@ -636,7 +636,7 @@ def remove_duplicates(input_file, output_file): if genre_line: output_lines.append(line) # 将结果写入输出文件 - with open(output_file, 'a', encoding='utf-8') as f: + with open(output_file, 'w', encoding='utf-8') as f: f.writelines(output_lines) print("去重后的行数:", len(output_lines))