fix: cant proceed to launch

This commit is contained in:
2025-07-11 19:54:42 +03:00
parent cb7b7424d0
commit d6aea35a14
2 changed files with 3 additions and 3 deletions

View File

@@ -19,4 +19,4 @@ ENV HSA_OVERRIDE_GFX_VERSION=10.3.0
ENV PYTORCH_ROCM_ARCH=gfx1030
# Команда для запуска приложения
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "9854", "--log-level", "debug"]
CMD ["python3", "app.py"]

4
app.py
View File

@@ -26,7 +26,7 @@ model = None
def load_model():
global model
logger.info("Loading whisper model...")
model = whisper.load_model("medium", device="cuda")
model = whisper.load_model("medium", device="cuda", in_memory=True)
logger.info("Whisper model loaded.")
@@ -199,7 +199,7 @@ async def transcribe_audio(
def main():
import uvicorn
get_keys()
uvicorn.run(app, host="0.0.0.0", port=9854, log_level="debug")
if __name__ == "__main__":
main()