Spaces:
Running
Running
fixed error if cuda not avail
Browse files
app.py
CHANGED
@@ -6,9 +6,11 @@ from plotly import graph_objects as go
|
|
6 |
from overview import NQDOverview
|
7 |
|
8 |
import torch
|
9 |
-
|
10 |
-
|
11 |
-
print(f"CUDA
|
|
|
|
|
12 |
|
13 |
# Function to load and cache models
|
14 |
@st.experimental_singleton(show_spinner=False)
|
|
|
6 |
from overview import NQDOverview
|
7 |
|
8 |
import torch
|
9 |
+
|
10 |
+
cuda_available = torch.cuda.is_available()
|
11 |
+
print(f"Is CUDA available: {cuda_available}")
|
12 |
+
if cuda_available:
|
13 |
+
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
14 |
|
15 |
# Function to load and cache models
|
16 |
@st.experimental_singleton(show_spinner=False)
|