osheina commited on
Commit
1b703a5
·
verified ·
1 Parent(s): 2ffe06d

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -2
utils.py CHANGED
@@ -16,7 +16,7 @@ class SLInference:
16
  pred (str): The prediction result.
17
  thread (Thread): The worker thread.
18
  """
19
- def __init__(self, config):
20
  """
21
  Initialize the SLInference object.
22
 
@@ -24,7 +24,7 @@ class SLInference:
24
  config_path (str): Path to the configuration file.
25
  """
26
  self.running = True
27
- self.config = config
28
  self.model = Predictor(self.config)
29
  self.input_queue = deque(maxlen=self.config["window_size"])
30
  self.pred = ""
 
16
  pred (str): The prediction result.
17
  thread (Thread): The worker thread.
18
  """
19
+ def __init__(self, config_path):
20
  """
21
  Initialize the SLInference object.
22
 
 
24
  config_path (str): Path to the configuration file.
25
  """
26
  self.running = True
27
+ self.config = self.read_config(config_path)
28
  self.model = Predictor(self.config)
29
  self.input_queue = deque(maxlen=self.config["window_size"])
30
  self.pred = ""