Spaces:
Runtime error
Runtime error
youssef227
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,12 @@
|
|
1 |
-
from
|
2 |
from peft import LoraConfig, get_peft_model
|
3 |
import torch
|
4 |
|
5 |
# Load the tokenizer and model
|
6 |
-
model = AutoModelForCausalLM.from_pretrained("youssef227/llama-3-8b-Instruct-bnb-telcom-3",hf=True)
|
7 |
print("step 1 ")
|
8 |
-
tokenizer = AutoTokenizer.from_pretrained(
|
9 |
print("step 2 ")
|
10 |
-
|
11 |
def generator(text):
|
12 |
inputs = tokenizer(
|
13 |
[
|
|
|
1 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
2 |
from peft import LoraConfig, get_peft_model
|
3 |
import torch
|
4 |
|
5 |
# Load the tokenizer and model
|
|
|
6 |
print("step 1 ")
|
7 |
+
tokenizer = AutoTokenizer.from_pretrained("youssef227/llama-3-8b-Instruct-bnb-telcom-3")
|
8 |
print("step 2 ")
|
9 |
+
model = AutoModelForCausalLM.from_pretrained("youssef227/llama-3-8b-Instruct-bnb-telcom-3")
|
10 |
def generator(text):
|
11 |
inputs = tokenizer(
|
12 |
[
|