Spaces:
Running
Running
JaphetHernandez
commited on
Commit
•
a77f2b3
1
Parent(s):
d8ad394
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,9 @@ model_name = "meta-llama/Llama-3.2-1B-Instruct"
|
|
12 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
13 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
14 |
|
|
|
|
|
|
|
15 |
# Texto de entrada para la generación
|
16 |
input_text = "Tu texto aquí"
|
17 |
inputs = tokenizer(input_text, return_tensors="pt", padding=True)
|
|
|
12 |
model = AutoModelForCausalLM.from_pretrained(model_name)
|
13 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
14 |
|
15 |
+
# Asignar el eos_token como pad_token
|
16 |
+
tokenizer.pad_token = tokenizer.eos_token
|
17 |
+
|
18 |
# Texto de entrada para la generación
|
19 |
input_text = "Tu texto aquí"
|
20 |
inputs = tokenizer(input_text, return_tensors="pt", padding=True)
|