Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
13 |
print(f"Using device: {device}")
|
14 |
|
15 |
# Load the Byaldi and Qwen2-VL models
|
16 |
-
rag_model = RAGMultiModalModel.from_pretrained("vidore/colpali")
|
17 |
qwen_model = Qwen2VLForConditionalGeneration.from_pretrained(
|
18 |
"Qwen/Qwen2-VL-7B-Instruct", trust_remote_code=True, torch_dtype=torch.bfloat16
|
19 |
).to(device) # Move Qwen2-VL to GPU
|
|
|
13 |
print(f"Using device: {device}")
|
14 |
|
15 |
# Load the Byaldi and Qwen2-VL models
|
16 |
+
rag_model = RAGMultiModalModel.from_pretrained("vidore/colpali") # Do not move Byaldi to GPU
|
17 |
qwen_model = Qwen2VLForConditionalGeneration.from_pretrained(
|
18 |
"Qwen/Qwen2-VL-7B-Instruct", trust_remote_code=True, torch_dtype=torch.bfloat16
|
19 |
).to(device) # Move Qwen2-VL to GPU
|