Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,9 +12,11 @@ CUSTOM_CSS = """
|
|
| 12 |
"""
|
| 13 |
|
| 14 |
zero = torch.Tensor([0]).cuda()
|
|
|
|
| 15 |
|
| 16 |
@spaces.GPU
|
| 17 |
def run_gpu() -> str:
|
|
|
|
| 18 |
output: str = ""
|
| 19 |
try:
|
| 20 |
output = subprocess.check_output(["nvidia-smi"], text=True)
|
|
|
|
| 12 |
"""
|
| 13 |
|
| 14 |
zero = torch.Tensor([0]).cuda()
|
| 15 |
+
print(zero.device) # <-- 'cpu' 🤔
|
| 16 |
|
| 17 |
@spaces.GPU
|
| 18 |
def run_gpu() -> str:
|
| 19 |
+
print(zero.device) # <-- 'cuda:0' 🤗
|
| 20 |
output: str = ""
|
| 21 |
try:
|
| 22 |
output = subprocess.check_output(["nvidia-smi"], text=True)
|