syberWolf commited on
Commit
17c9dd0
·
1 Parent(s): fe371ad

update handler

Browse files
Files changed (1) hide show
  1. handler.py +3 -3
handler.py CHANGED
@@ -4,12 +4,12 @@ import os
4
 
5
 
6
  class EndpointHandler:
7
- def __init__(self):
8
  # Construct the model path assuming the model is in the same directory as the handler file
9
  script_dir = os.path.dirname(os.path.abspath(__file__))
10
  model_filename = "Phi-3-medium-128k-instruct-IQ2_XS.gguf"
11
- self.model_path = os.path.join(script_dir, model_filename)
12
-
13
  # Load the GGUF model using llama_cpp
14
  self.llm = Llama(
15
  model_path=self.model_path,
 
4
 
5
 
6
  class EndpointHandler:
7
+ def __init__(self, model_path=""):
8
  # Construct the model path assuming the model is in the same directory as the handler file
9
  script_dir = os.path.dirname(os.path.abspath(__file__))
10
  model_filename = "Phi-3-medium-128k-instruct-IQ2_XS.gguf"
11
+ self.model_path = os.path.join(script_dir, model_path)
12
+
13
  # Load the GGUF model using llama_cpp
14
  self.llm = Llama(
15
  model_path=self.model_path,