mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 16:16:31 +00:00
add azaion loader
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user