thiswillbeyourgithub 7 tháng trước cách đây
mục cha
commit
82b35492af
2 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 1 0
      backend/open_webui/__init__.py
  2. 1 0
      backend/open_webui/env.py

+ 1 - 0
backend/open_webui/__init__.py

@@ -41,6 +41,7 @@ def serve(
         )
         try:
             import torch
+
             assert torch.cuda.is_available(), "CUDA not available"
             typer.echo("CUDA seems to be working")
         except Exception as e:

+ 1 - 0
backend/open_webui/env.py

@@ -38,6 +38,7 @@ USE_CUDA = os.environ.get("USE_CUDA_DOCKER", "false")
 if USE_CUDA.lower() == "true":
     try:
         import torch
+
         assert torch.cuda.is_available(), "CUDA not available"
         DEVICE_TYPE = "cuda"
     except Exception as e: