make start faster

This commit is contained in:
Alex Bezdieniezhnykh
2025-02-12 13:49:01 +02:00
parent 43cae0d03c
commit e329e5bb67
5 changed files with 20 additions and 12 deletions
+2 -2
View File
@@ -32,10 +32,10 @@ cdef class CommandProcessor:
self.inference_queue = Queue(maxsize=constants.QUEUE_MAXSIZE)
self.remote_handler.start()
self.running = True
model = self.api_client.load_ai_model()
self.inference = Inference(model, self.on_annotation)
self.inference = Inference(self.api_client, self.on_annotation)
def start(self):
print('Started!')
while self.running:
try:
command = self.inference_queue.get(timeout=0.5)