From 0670bfe198e12cb25800cfae48677d90ea978cf2 Mon Sep 17 00:00:00 2001 From: pks Date: Mon, 1 Dec 2025 23:19:44 +0100 Subject: WIP --- inference.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'inference.py') diff --git a/inference.py b/inference.py index 351ffd9..69ab33b 100755 --- a/inference.py +++ b/inference.py @@ -14,7 +14,7 @@ from transformers import AutoProcessor, Gemma3ForConditionalGeneration def clean_str(s): - return s.removeprefix("```json").removesuffix("```").replace("\n", "").strip() + return s.removeprefix("```json").removesuffix("```").replace("\n", "").strip() def captioning_prompt(image): @@ -118,7 +118,7 @@ def main(): sys.stderr.write(f"Error loading JSON from string '{decoded}' for {filename=}\n") data.update(new_data) - print(json.dumps(data)) + print(json.dumps(data)) elif args.mode == "from_scratch": # Generate caption & translation from scratch for x in dataset: -- cgit v1.2.3