Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import os
|
|
3 |
os.system("git clone https://github.com/TimDettmers/bitsandbytes.git")
|
4 |
os.system("cd bitsandbytes/ && pip install -r requirements-dev.txt && cmake -DCOMPUTE_BACKEND=cuda -S . && make && pip install .")
|
5 |
# Check if GPU is available
|
|
|
6 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
7 |
print(f"Using device: {device}")
|
8 |
|
|
|
3 |
os.system("git clone https://github.com/TimDettmers/bitsandbytes.git")
|
4 |
os.system("cd bitsandbytes/ && pip install -r requirements-dev.txt && cmake -DCOMPUTE_BACKEND=cuda -S . && make && pip install .")
|
5 |
# Check if GPU is available
|
6 |
+
import torch
|
7 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
8 |
print(f"Using device: {device}")
|
9 |
|