Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
2 |
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
|
3 |
import torch
|
|
|
1 |
+
import os
|
2 |
+
# Clone the repository
|
3 |
+
os.system("git clone https://github.com/TimDettmers/bitsandbytes.git")
|
4 |
+
# Change into the cloned repository
|
5 |
+
os.system("cd bitsandbytes/")
|
6 |
+
# Install dependencies
|
7 |
+
os.system("pip install -r requirements-dev.txt")
|
8 |
+
# Configure with CUDA support
|
9 |
+
os.system("cmake -DCOMPUTE_BACKEND=cuda -S .")
|
10 |
+
# Build and install
|
11 |
+
os.system("make")
|
12 |
+
os.system("pip install .")
|
13 |
import gradio as gr
|
14 |
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
|
15 |
import torch
|