Skip to content

Commit 91db558

Browse files
Update baselines/LongForm/longform.py
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 7d4328c commit 91db558

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

baselines/LongForm/longform.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ async def process_chunk(content: str):
101101

102102
# Save results
103103
output_dir = os.path.dirname(args.output_file)
104-
if output_dir and not os.path.exists(output_dir):
105-
os.makedirs(output_dir)
104+
if output_dir:
105+
os.makedirs(output_dir, exist_ok=True)
106106

107107
with open(args.output_file, "w", encoding="utf-8") as f:
108108
json.dump(results, f, indent=4, ensure_ascii=False)

0 commit comments

Comments
 (0)