mirror of https://github.com/open-webui/open-webui
pep8
This commit is contained in:
parent
a7ea07036e
commit
82b35492af
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue