1.0
This commit is contained in:
19
demos/demo_movie.py
Normal file
19
demos/demo_movie.py
Normal 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}")
|
||||
Reference in New Issue
Block a user