Skip to content

Commit 8f03e14

Browse files
Update wrap.py
1 parent 5dadbdb commit 8f03e14

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

baselines/Wrap/wrap.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,5 +117,9 @@ async def process_chunk(content: str):
117117
results = wrap.generate(data)
118118

119119
# Save results
120+
output_dir = os.path.dirname(args.output_file)
121+
if output_dir:
122+
os.makedirs(output_dir, exist_ok=True)
123+
120124
with open(args.output_file, "w", encoding="utf-8") as f:
121125
json.dump(results, f, indent=4, ensure_ascii=False)

0 commit comments

Comments
 (0)