SpyC0der77 commited on
Commit
34f8991
·
verified ·
1 Parent(s): e920afb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -34,7 +34,7 @@ def process(prompt):
34
  time = time.replace(".", "").replace(":","")
35
  image = client.text_to_image(response)
36
  image.save("outputs/images/" + time + ".png")
37
- with open("outputs/" + time + ".json", "wb") as f:
38
  f.write(json.dumps({"prompt": prompt, "refined_prompt": response, "image": "outputs/images/" + time + ".png"}))
39
  return image
40
 
 
34
  time = time.replace(".", "").replace(":","")
35
  image = client.text_to_image(response)
36
  image.save("outputs/images/" + time + ".png")
37
+ with open("outputs/" + time + ".json", "w") as f:
38
  f.write(json.dumps({"prompt": prompt, "refined_prompt": response, "image": "outputs/images/" + time + ".png"}))
39
  return image
40