Shuang59 commited on
Commit
539d4d6
β€’
1 Parent(s): 5d29bbd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -229,9 +229,10 @@ if has_cuda:
229
  clevr_model.to(device)
230
  clevr_model.load_state_dict(th.load(download_model('clevr_pos'), device))
231
 
232
- def compose_clevr_objects(coordinates):
 
233
  coordinates = [[float(x.split(',')[0].strip()), float(x.split(',')[1].strip())]
234
- for x in coordinates.split('|')]
235
  coordinates += [[-1, -1]] # add unconditional score label
236
  batch_size = 1
237
  guidance_scale = 10
 
229
  clevr_model.to(device)
230
  clevr_model.load_state_dict(th.load(download_model('clevr_pos'), device))
231
 
232
+ def compose_clevr_objects(prompt):
233
+ print(prompt)
234
  coordinates = [[float(x.split(',')[0].strip()), float(x.split(',')[1].strip())]
235
+ for x in prompt.split('|')]
236
  coordinates += [[-1, -1]] # add unconditional score label
237
  batch_size = 1
238
  guidance_scale = 10