rynmurdock commited on
Commit
95d570a
1 Parent(s): ca169c6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -92,9 +92,13 @@ def next_image():
92
  prompt= 'an image' if glob_idx % 2 == 0 else rng_prompt
93
  print(prompt)
94
 
 
 
 
 
95
  output = replicate.run(
96
  "rynmurdock/zahir:49ebb1916c4baae35884ebfa16b092cf45d086c1913b53f62bb07d575cdbe683",
97
- input={"prompt": prompt, 'im_emb': im_emb.tolist()}
98
  )
99
  response = requests.get(output['file1'])
100
  image = Image.open(BytesIO(response.content))
 
92
  prompt= 'an image' if glob_idx % 2 == 0 else rng_prompt
93
  print(prompt)
94
 
95
+ im_emb_st = str(im_emb[0].cpu().detach().tolist())[1:-1]
96
+ output = StringIO()
97
+ output.write(im_emb_st)
98
+
99
  output = replicate.run(
100
  "rynmurdock/zahir:49ebb1916c4baae35884ebfa16b092cf45d086c1913b53f62bb07d575cdbe683",
101
+ input={"prompt": prompt, 'im_emb': output}
102
  )
103
  response = requests.get(output['file1'])
104
  image = Image.open(BytesIO(response.content))