]> git.cworth.org Git - zombocom-ai/commitdiff
Fix a mix-up of "code" vs. "seed"
authorCarl Worth <cworth@cworth.org>
Wed, 7 Dec 2022 09:35:04 +0000 (01:35 -0800)
committerCarl Worth <cworth@cworth.org>
Wed, 7 Dec 2022 09:35:04 +0000 (01:35 -0800)
The UI at the top-level facing the users uses "code", but the API down
deep uses "seed" so there has to be a switch at some point, which
wasn't quite correct before this fix.

generate-image.py

index 229428f3163d284276f653f5ed0c0dd9e5c5618a..3a2d3f3f65593fdd03a4b308af3ebd412295abf0 100755 (executable)
@@ -39,7 +39,7 @@ def save_artifact(artifact, prompt):
 
     img = Image.open(io.BytesIO(artifact.binary))
     img.save(filename)
-    return {"seed": seed, "prompt": prompt,
+    return {"code": seed, "prompt": prompt,
             "filename": filename.removeprefix(DOCUMENT_ROOT)}
 
 def main() -> None: