Spaces:
Runtime error
Runtime error
Jonas Rheiner
commited on
Commit
·
b3cbb18
1
Parent(s):
e20beac
Fix torch device for cpu
Browse files
app.py
CHANGED
@@ -15,8 +15,9 @@ os.environ["PYTHONHASHSEED"] = "42"
|
|
15 |
CUDA_AVAILABLE = torch.cuda.is_available()
|
16 |
print(f"CUDA={CUDA_AVAILABLE}")
|
17 |
device = "cuda" if CUDA_AVAILABLE else "cpu"
|
18 |
-
|
19 |
-
print(f"
|
|
|
20 |
|
21 |
continent_model = CLIPModel.from_pretrained(
|
22 |
"jrheiner/thesis-clip-geoloc-continent",
|
|
|
15 |
CUDA_AVAILABLE = torch.cuda.is_available()
|
16 |
print(f"CUDA={CUDA_AVAILABLE}")
|
17 |
device = "cuda" if CUDA_AVAILABLE else "cpu"
|
18 |
+
if CUDA_AVAILABLE:
|
19 |
+
print(f"count={torch.cuda.device_count()}")
|
20 |
+
print(f"current={torch.cuda.get_device_name(torch.cuda.current_device())}")
|
21 |
|
22 |
continent_model = CLIPModel.from_pretrained(
|
23 |
"jrheiner/thesis-clip-geoloc-continent",
|