Update handler.py
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -9,7 +9,7 @@ class EndpointHandler():
|
|
| 9 |
self.device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
| 10 |
self.torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
| 11 |
|
| 12 |
-
self.model = AutoModelForCausalLM.from_pretrained("microsoft/Florence-2-large", torch_dtype=torch_dtype, trust_remote_code=True).to(device)
|
| 13 |
self.processor = AutoProcessor.from_pretrained("microsoft/Florence-2-large", trust_remote_code=True)
|
| 14 |
|
| 15 |
|
|
|
|
| 9 |
self.device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
| 10 |
self.torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
| 11 |
|
| 12 |
+
self.model = AutoModelForCausalLM.from_pretrained("microsoft/Florence-2-large", torch_dtype=self.torch_dtype, trust_remote_code=True).to(self.device)
|
| 13 |
self.processor = AutoProcessor.from_pretrained("microsoft/Florence-2-large", trust_remote_code=True)
|
| 14 |
|
| 15 |
|