Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|