add azaion loader

This commit is contained in:
Alex Bezdieniezhnykh
2025-06-01 19:16:49 +03:00
parent 2584b4f125
commit 500db31142
54 changed files with 629 additions and 291 deletions
+2 -5
View File
@@ -6,27 +6,24 @@ from threading import Thread
import yaml
from api_client cimport ApiClient
from annotation cimport Annotation
from inference cimport Inference
from remote_command cimport RemoteCommand, CommandType
from remote_command_handler cimport RemoteCommandHandler
from credentials cimport Credentials
from file_data cimport FileData
cdef class CommandProcessor:
cdef ApiClient api_client
cdef RemoteCommandHandler remote_handler
cdef object inference_queue
cdef bint running
cdef Inference inference
def __init__(self, int zmq_port, str api_url):
self.api_client = ApiClient(api_url)
self.remote_handler = RemoteCommandHandler(zmq_port, self.on_command)
self.inference_queue = Queue(maxsize=constants.QUEUE_MAXSIZE)
self.remote_handler.start()
self.running = True
#TODO: replace api_client to azaion_loader.exe call
self.inference = Inference(self.api_client, self.on_annotation)
def start(self):