Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -6,8 +6,8 @@ from transformers import AutoTokenizer, AutoModelForCausalLM
|
|
| 6 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 7 |
|
| 8 |
# Load tokenizer and model from local directory
|
| 9 |
-
tokenizer = AutoTokenizer.from_pretrained("rat45/sql-lora-model
|
| 10 |
-
model = AutoModelForCausalLM.from_pretrained("rat45/sql-lora-model
|
| 11 |
|
| 12 |
|
| 13 |
# Define generation function
|
|
|
|
| 6 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 7 |
|
| 8 |
# Load tokenizer and model from local directory
|
| 9 |
+
tokenizer = AutoTokenizer.from_pretrained("rat45/sql-lora-model")
|
| 10 |
+
model = AutoModelForCausalLM.from_pretrained("rat45/sql-lora-model").to(device)
|
| 11 |
|
| 12 |
|
| 13 |
# Define generation function
|