diff options
Diffstat (limited to 'inference.py')
| -rwxr-xr-x | inference.py | 4 |
1 files changed, 2 insertions, 2 deletions
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: |
