Update handler.py
Browse files- handler.py +1 -2
handler.py
CHANGED
|
@@ -102,8 +102,7 @@ class Utils:
|
|
| 102 |
|
| 103 |
class EndpointHandler:
|
| 104 |
def __init__(self, path=""):
|
| 105 |
-
self.model, self.tokenizer = FastVisionModel.from_pretrained(model_id, token=os.getenv('HF_TOKEN'),
|
| 106 |
-
quantization_config=BitsAndBytesConfig(load_in_4bit=True))
|
| 107 |
self.model.load_adapter(adapter_id)
|
| 108 |
|
| 109 |
def __call__(self, data: Dict[str, bytes]) -> Dict[str, List[Any]]:
|
|
|
|
| 102 |
|
| 103 |
class EndpointHandler:
|
| 104 |
def __init__(self, path=""):
|
| 105 |
+
self.model, self.tokenizer = FastVisionModel.from_pretrained(model_id, token=os.getenv('HF_TOKEN'),load_in_4bit=True)
|
|
|
|
| 106 |
self.model.load_adapter(adapter_id)
|
| 107 |
|
| 108 |
def __call__(self, data: Dict[str, bytes]) -> Dict[str, List[Any]]:
|