Update handler.py
Browse files- handler.py +1 -7
handler.py
CHANGED
@@ -30,13 +30,7 @@ class EndpointHandler:
|
|
30 |
Args:
|
31 |
path (str): Path to the GGUF file.
|
32 |
"""
|
33 |
-
|
34 |
-
model_path = path if path else "./Llama-3.2-1B-Instruct-Q4_K_L.gguf"
|
35 |
-
|
36 |
-
if not os.path.exists(model_path):
|
37 |
-
raise ValueError(f"Model path does not exist: {model_path}")
|
38 |
-
|
39 |
-
self.model = Llama(model_path=model_path)
|
40 |
self.tokenizer = self.model.tokenizer # GGUF-specific tokenizer, if available
|
41 |
|
42 |
def __call__(self, data: Any) -> List[Dict[str, str]]:
|
|
|
30 |
Args:
|
31 |
path (str): Path to the GGUF file.
|
32 |
"""
|
33 |
+
self.model = Llama(model_path='/repository/model.gguf')
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
self.tokenizer = self.model.tokenizer # GGUF-specific tokenizer, if available
|
35 |
|
36 |
def __call__(self, data: Any) -> List[Dict[str, str]]:
|