How to use the alephclient.services.entityextract_pb2_grpc.add_EntityExtractServicer_to_server function in alephclient

To help you get started, we’ve selected a few alephclient examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github alephdata / aleph / services / extract-spacy / service.py View on Github external
def serve(port):
    server = grpc.server(futures.ThreadPoolExecutor(max_workers=20))
    add_EntityExtractServicer_to_server(SpacyServicer(), server)
    server.add_insecure_port(port)
    server.start()
    log.info("Server started: %s", port)
    try:
        while True:
            time.sleep(84600)
    except KeyboardInterrupt:
        server.stop(60)
github alephdata / aleph / services / extract-entities / entityextractor / service.py View on Github external
def serve(port):
    executor = futures.ThreadPoolExecutor(max_workers=3)
    server = grpc.server(executor)
    add_EntityExtractServicer_to_server(EntityServicer(), server)
    server.add_insecure_port(port)
    server.start()
    log.info("Server started: %s", port)
    try:
        while True:
            time.sleep(84600)
    except KeyboardInterrupt:
        server.stop(60)
github alephdata / aleph / services / extract-entities / entityextractor / service.py View on Github external
def serve(port):
    executor = futures.ThreadPoolExecutor(max_workers=3)
    server = grpc.server(executor)
    add_EntityExtractServicer_to_server(EntityServicer(), server)
    server.add_insecure_port(port)
    server.start()
    log.info("Server started: %s", port)
    try:
        while True:
            time.sleep(84600)
    except KeyboardInterrupt:
        server.stop(60)