This commit is contained in:
itqop 2025-03-03 04:23:04 +03:00
parent 6a72b0404b
commit 9ed038557c
3 changed files with 4 additions and 6 deletions

View File

@ -1,4 +1,4 @@
from app.config import MAX_INPUT_LENGTH, MAX_OUTPUT_LENGTH
from config import MAX_INPUT_LENGTH, MAX_OUTPUT_LENGTH
class InferenceService:
def __init__(self, model_loader: "ModelLoader"):

View File

@ -1,7 +1,5 @@
# app/redis_client.py
import os
import json
import time
import redis
from typing import List
from pydantic import BaseModel

View File

@ -1,8 +1,8 @@
# app/worker.py
import time
from app.model_loader import ModelLoader
from app.inference_service import InferenceService
from app.redis_client import RedisClient
from model_loader import ModelLoader
from inference_service import InferenceService
from redis_client import RedisClient
from config import BASE_MODEL, ADAPTER_DIR, HF_TOKEN, REDIS_HOST, REDIS_PORT, TEXT_RESULT_CHANNEL, TEXT_TASK_CHANNEL, BATCH_SIZE, WAIT_TIMEOUT
def main():