Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -8,7 +8,7 @@ import requests
|
|
| 8 |
class EndpointHandler():
|
| 9 |
def __init__(self, path=""):
|
| 10 |
self.processor = AutoProcessor.from_pretrained(path)
|
| 11 |
-
self.model = Qwen2VLForConditionalGeneration.from_pretrained(path)
|
| 12 |
|
| 13 |
def __call__(self, data: Any) -> Dict[str, Any]:
|
| 14 |
|
|
|
|
| 8 |
class EndpointHandler():
|
| 9 |
def __init__(self, path=""):
|
| 10 |
self.processor = AutoProcessor.from_pretrained(path)
|
| 11 |
+
self.model = Qwen2VLForConditionalGeneration.from_pretrained(path, device_map="cuda:0")
|
| 12 |
|
| 13 |
def __call__(self, data: Any) -> Dict[str, Any]:
|
| 14 |
|