Spaces:
Configuration error
Configuration error
oremaz
commited on
Commit
·
3c84018
1
Parent(s):
f0fbe81
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -131,10 +131,9 @@ def initialize_models(use_api_mode=False):
|
|
| 131 |
context_window: int = 32768
|
| 132 |
num_output: int = 256
|
| 133 |
model_name: str = "Qwen/Qwen2.5-VL-7B-Instruct"
|
| 134 |
-
device: str = Field(default="cuda")
|
| 135 |
|
| 136 |
def __init__(self):
|
| 137 |
-
self.device =
|
| 138 |
self.model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
| 139 |
self.model_name, torch_dtype=torch.bfloat16, device_map="auto"
|
| 140 |
)
|
|
|
|
| 131 |
context_window: int = 32768
|
| 132 |
num_output: int = 256
|
| 133 |
model_name: str = "Qwen/Qwen2.5-VL-7B-Instruct"
|
|
|
|
| 134 |
|
| 135 |
def __init__(self):
|
| 136 |
+
self.device = "cuda"
|
| 137 |
self.model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
|
| 138 |
self.model_name, torch_dtype=torch.bfloat16, device_map="auto"
|
| 139 |
)
|