Files
Claude_tests/demos/demo_movie.py
Johannes c24df544b8 1.0
2026-04-10 15:49:53 +02:00

20 lines
542 B
Python

import sys
from pathlib import Path
sys.path.append(str(Path(__file__).resolve().parent.parent))
from image_query import query_claude, resolve_output_path
image = "Test_pic.jpg" # looked up in pics/
prompt = "If this image were a movie, what genre would it be and why?"
output = "demo_movie.txt" # saved to output/
result = query_claude(image, prompt)
resolved_output = resolve_output_path(output)
with open(resolved_output, "w", encoding="utf-8") as f:
f.write(result)
print(result)
print(f"\nSaved to {resolved_output}")