Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,8 @@ 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 |
import torch
|
7 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
8 |
print(f"Using device: {device}")
|
|
|
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 gradio as gr
|
7 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
|
8 |
import torch
|
9 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
10 |
print(f"Using device: {device}")
|