Spaces:
Running on Zero
Running on Zero
Download app/gpu_init.py from DmitryRyumin/MASAI: direct link, hf CLI and curl.
- Browser
- Download file 264 Bytes
-
https://huggingface.co/spaces/DmitryRyumin/MASAI/resolve/refs%2Fpr%2F3/app/gpu_init.py
- Command line
-
hf download hf://spaces/DmitryRyumin/MASAI@refs/pr/3/app/gpu_init.py
-
curl -L -o gpu_init.py https://huggingface.co/spaces/DmitryRyumin/MASAI/resolve/refs%2Fpr%2F3/app/gpu_init.py
264 Bytes
| """ | |
| File: gpu_init.py | |
| Author: Dmitry Ryumin, Maxim Markitantov, Elena Ryumina, Anastasia Dvoynikova, and Alexey Karpov | |
| Description: GPU initialization. | |
| License: MIT License | |
| """ | |
| import torch | |
| device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu") | |