This commit is contained in:
Johannes
2026-04-10 15:49:53 +02:00
parent 1c5ccf4b1c
commit c24df544b8
6 changed files with 290 additions and 12 deletions

19
demos/demo_colors.py Normal file
View File

@@ -0,0 +1,19 @@
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 = "What colors dominate this image?"
output = "demo_colors.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}")

19
demos/demo_describe.py Normal file
View File

@@ -0,0 +1,19 @@
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 = "Describe this image in extensive detail detail."
output = "demo_describe.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}")

19
demos/demo_movie.py Normal file
View File

@@ -0,0 +1,19 @@
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}")