yejunliang23 commited on
Commit
d3f06b1
·
verified ·
1 Parent(s): ad9acf3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -263,9 +263,7 @@ def add_file(history, task_history, file, task_new, fig, query):
263
  coords = ((torch.from_numpy(position_recon) + 0.5) * 64).int().contiguous()
264
  ss = torch.zeros(1, 64, 64, 64, dtype=torch.long)
265
  ss[:, coords[:, 0], coords[:, 1], coords[:, 2]] = 1
266
- print(ss)
267
- print(ss.max(),ss.min())
268
- token = vqvae.Encode(ss.to(dtype=torch.float32).unsqueeze(0))
269
  token = token[0].cpu().numpy().tolist()
270
  words = token_to_words(token)
271
  fig = make_pointcloud_figure(position_recon,rotate=True)
 
263
  coords = ((torch.from_numpy(position_recon) + 0.5) * 64).int().contiguous()
264
  ss = torch.zeros(1, 64, 64, 64, dtype=torch.long)
265
  ss[:, coords[:, 0], coords[:, 1], coords[:, 2]] = 1
266
+ token = vqvae.Encode(ss.to(dtype=torch.float32).unsqueeze(0).to("cuda"))
 
 
267
  token = token[0].cpu().numpy().tolist()
268
  words = token_to_words(token)
269
  fig = make_pointcloud_figure(position_recon,rotate=True)