mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 12:36:31 +00:00
fix converting model initialization
This commit is contained in:
@@ -24,7 +24,7 @@ cdef class CommandProcessor:
|
||||
self.remote_handler.start()
|
||||
self.running = True
|
||||
self.loader_client = LoaderClient(loader_zmq_host, loader_zmq_port)
|
||||
self.inference = Inference(self.loader_client, self.on_annotation)
|
||||
self.inference = Inference(self.loader_client, self.remote_handler)
|
||||
|
||||
def start(self):
|
||||
while self.running:
|
||||
@@ -54,11 +54,7 @@ cdef class CommandProcessor:
|
||||
else:
|
||||
pass
|
||||
except Exception as e:
|
||||
constants_inf.logerror(f"Error handling client: {e}")
|
||||
|
||||
cdef on_annotation(self, RemoteCommand cmd, Annotation annotation):
|
||||
cdef RemoteCommand response = RemoteCommand(CommandType.INFERENCE_DATA, annotation.serialize())
|
||||
self.remote_handler.send(cmd.client_id, response.serialize())
|
||||
constants_inf.logerror(<str>f"Error handling client: {str(e)}")
|
||||
|
||||
def stop(self):
|
||||
self.inference.stop()
|
||||
|
||||
Reference in New Issue
Block a user