From e7f7120f27815b4121efe66be002753725104b5c Mon Sep 17 00:00:00 2001 From: vladislav Date: Tue, 15 Jul 2025 02:13:35 +0300 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=B5=D0=BB=D0=B0=D0=B5=D0=BC=20HIP=20?= =?UTF-8?q?=D1=81=D0=BE=D0=B2=D0=BC=D0=B5=D1=81=D1=82=D0=B8=D0=BC=D0=BE?= =?UTF-8?q?=D1=81=D1=82=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.py b/app.py index b984f52..781a047 100644 --- a/app.py +++ b/app.py @@ -2,10 +2,10 @@ import logging import os import subprocess import time +from os import getenv from typing import Dict -from typing import Optional, Union, List, Tuple -import gigaam +import gigaam from fastapi import FastAPI, Depends, HTTPException, UploadFile, File from fastapi.security import APIKeyHeader @@ -18,7 +18,7 @@ logger = logging.getLogger(__name__) app = FastAPI() -model = gigaam.load_model("v2_ctc", device="cuda", download_root="./model") +model = gigaam.load_model("v2_ctc", device=getenv("ASR_DEVICE"), download_root=getenv("ASR_MODELS_ROOT")) # API key header api_key_header = APIKeyHeader(name="x-api-key")