Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -61,7 +61,7 @@ def index(files, ds):
|
|
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[
|
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
|
|
|
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
|