Spaces:
Build error
Build error
Download tools/gpu_notebook_test.py from bioleather/ebook2audiobook: direct link, hf CLI and curl.
- Browser
- Download file 338 Bytes
-
https://huggingface.co/spaces/bioleather/ebook2audiobook/resolve/main/tools/gpu_notebook_test.py
- Command line
-
hf download hf://spaces/bioleather/ebook2audiobook/tools/gpu_notebook_test.py
-
curl -L -o gpu_notebook_test.py https://huggingface.co/spaces/bioleather/ebook2audiobook/resolve/main/tools/gpu_notebook_test.py
338 Bytes
| import torch | |
| print("Torch version:", torch.__version__) | |
| print("CUDA Available:", torch.cuda.is_available()) | |
| if torch.cuda.is_available(): | |
| print("Number of GPUs:", torch.cuda.device_count()) | |
| for i in range(torch.cuda.device_count()): | |
| print(f"GPU {i}: {torch.cuda.get_device_name(i)}") | |
| else: | |
| print("No GPU detected.") | |