diff --git a/app/core/config.py b/app/core/config.py index 8b8ce60..0b01713 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -60,6 +60,7 @@ LOGS_PATH = "app/logs/errors.log" # LOGS_PATH = "logs/errors.log" SR_MODEL_NAME = "super_resolution" +SR_TRITON_URL = "10.1.1.240:10031" # rabbitmq config diff --git a/app/service/super_resolution/service.py b/app/service/super_resolution/service.py index f015c6c..82210c3 100644 --- a/app/service/super_resolution/service.py +++ b/app/service/super_resolution/service.py @@ -16,7 +16,7 @@ import tritonclient.grpc as grpcclient from PIL import Image from minio import Minio -from app.core.config import MINIO_IP, MINIO_ACCESS, MINIO_SECRET, MINIO_SECURE, MINIO_PORT, REDIS_HOST, REDIS_PORT, REDIS_DB, SR_MODEL_NAME, RABBITMQ_PARAMS, RABBITMQ_QUEUES +from app.core.config import MINIO_IP, MINIO_ACCESS, MINIO_SECRET, MINIO_SECURE, MINIO_PORT, REDIS_HOST, REDIS_PORT, REDIS_DB, SR_MODEL_NAME, RABBITMQ_PARAMS, RABBITMQ_QUEUES, SR_TRITON_URL from app.schemas.super_resolution import SuperResolutionModel from app.service.utils.decorator import RunTime @@ -27,8 +27,7 @@ logger = logging.getLogger() class SuperResolution: def __init__(self, data): - self.triton_client = httpclient.InferenceServerClient(url=f"10.1.1.150:7000") - self.triton_client = grpcclient.InferenceServerClient(url=f"10.1.1.150:7001") + self.triton_client = grpcclient.InferenceServerClient(url=SR_TRITON_URL) self.redis_client = redis.StrictRedis(host=REDIS_HOST, port=REDIS_PORT, db=REDIS_DB, decode_responses=True) self.tasks_id = data.sr_tasks_id self.sr_image_url = data.sr_image_url