Spaces:
Running
Running
Update utils.py
Browse files
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,
|
| 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 =
|
| 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 = ""
|