Spaces:
Runtime error
Runtime error
Commit ·
9743952
1
Parent(s): a40e9fa
Test CUDA
Browse files- app.py +3 -0
- requirements.txt +5 -2
app.py
CHANGED
|
@@ -39,6 +39,9 @@ print(">>> MODEL CACHE PATH:", MODEL_CACHE, os.listdir(MODEL_CACHE))
|
|
| 39 |
|
| 40 |
device = "gpu" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
|
| 41 |
dtype = torch.float16 if device in ("mps", "gpu") else torch.float32
|
|
|
|
|
|
|
|
|
|
| 42 |
# bnb_config = BitsAndBytesConfig(load_in_8bit=True)
|
| 43 |
|
| 44 |
|
|
|
|
| 39 |
|
| 40 |
device = "gpu" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
|
| 41 |
dtype = torch.float16 if device in ("mps", "gpu") else torch.float32
|
| 42 |
+
|
| 43 |
+
print("CUDA available:", torch.cuda.is_available()) # True
|
| 44 |
+
print("Device name:", torch.cuda.get_device_name(0))
|
| 45 |
# bnb_config = BitsAndBytesConfig(load_in_8bit=True)
|
| 46 |
|
| 47 |
|
requirements.txt
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
annotated-types==0.7.0
|
| 2 |
attrs==25.3.0
|
| 3 |
beautifulsoup4==4.13.4
|
|
@@ -74,8 +79,6 @@ sympy==1.14.0
|
|
| 74 |
tabulate==0.9.0
|
| 75 |
tifffile==2025.5.10
|
| 76 |
tokenizers==0.21.1
|
| 77 |
-
torch==2.7.0
|
| 78 |
-
torchvision==0.22.0
|
| 79 |
tqdm==4.67.1
|
| 80 |
transformers==4.51.3
|
| 81 |
typer==0.15.4
|
|
|
|
| 1 |
+
--extra-index-url https://download.pytorch.org/whl/cu118
|
| 2 |
+
|
| 3 |
+
torch==2.0.1+cu118
|
| 4 |
+
torchvision==0.15.2+cu118
|
| 5 |
+
torchaudio==2.0.2+cu118
|
| 6 |
annotated-types==0.7.0
|
| 7 |
attrs==25.3.0
|
| 8 |
beautifulsoup4==4.13.4
|
|
|
|
| 79 |
tabulate==0.9.0
|
| 80 |
tifffile==2025.5.10
|
| 81 |
tokenizers==0.21.1
|
|
|
|
|
|
|
| 82 |
tqdm==4.67.1
|
| 83 |
transformers==4.51.3
|
| 84 |
typer==0.15.4
|