summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpks <pks@pks.rocks>2025-12-05 22:29:08 +0100
committerpks <pks@pks.rocks>2025-12-05 22:29:08 +0100
commitea8b2babdc3d48d76041724bf9bc491dce5145c7 (patch)
treec3b31d92a10b14fce5a974e70243352e0448b6ba
parent12e626a66195c9f19881ab5237e567485804cd73 (diff)
WIP
-rwxr-xr-x[-rw-r--r--]inference.py0
-rwxr-xr-xmake_dataset.py4
2 files changed, 2 insertions, 2 deletions
diff --git a/inference.py b/inference.py
index 67e633a..67e633a 100644..100755
--- a/inference.py
+++ b/inference.py
diff --git a/make_dataset.py b/make_dataset.py
index b2f2cee..157f97a 100755
--- a/make_dataset.py
+++ b/make_dataset.py
@@ -9,7 +9,7 @@ from glob import glob
from PIL import Image
-def make_dataset(base="./baseline"):
+def make_dataset(base="./d/baseline/jsonl"):
prompt = "You are a professional English-German translator and also a renowned photography critic.\n\nWrite a detailed caption for this image in a single sentence. Translate the caption into German. The output needs to be JSON, the keys being 'English' and 'German' for the respective captions. Only output the JSON, nothing else." + "<start_of_image>"
user_prompts = []
@@ -21,7 +21,7 @@ def make_dataset(base="./baseline"):
with open(filename, "r") as f:
data = json.loads(f.read())
id_ = os.path.basename(filename).removesuffix(".jsonl")
- image_path = f"../d/Images/{id_.removesuffix(".jsonl")}.jpg"
+ image_path = f"d/Images/{id_.removesuffix(".jsonl")}.jpg"
user_prompts.append(prompt)
assistant_replies.append(json.dumps({