manu commited on
Commit
26718e0
β€’
1 Parent(s): 6851b70

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -60,8 +60,8 @@ def index(files, ds):
60
  for batch_doc in tqdm(dataloader):
61
  with torch.no_grad():
62
  batch_doc = {k: v.to(model.device) for k, v in batch_doc.items()}
63
- print(f"model device: {model.device})
64
- print(f"model device: {batch_doc.input_ids})
65
  embeddings_doc = model(**batch_doc)
66
  ds.extend(list(torch.unbind(embeddings_doc.to("cpu"))))
67
  return f"Uploaded and converted {len(images)} pages", ds, images
 
60
  for batch_doc in tqdm(dataloader):
61
  with torch.no_grad():
62
  batch_doc = {k: v.to(model.device) for k, v in batch_doc.items()}
63
+ print(f"model device: {model.device}")
64
+ print(f"model device: {batch_doc.input_ids}")
65
  embeddings_doc = model(**batch_doc)
66
  ds.extend(list(torch.unbind(embeddings_doc.to("cpu"))))
67
  return f"Uploaded and converted {len(images)} pages", ds, images