Spaces:
Sleeping
Sleeping
tebicap commited on
Commit ·
fee7bb8
1
Parent(s): da29cb0
arreglo loop for
Browse files
app.py
CHANGED
|
@@ -12,11 +12,10 @@ def generate_text(prompt):
|
|
| 12 |
input_ids = tokenizer.encode(prompt, return_tensors="pt", max_length=512, truncation=True)
|
| 13 |
output_ids = model.generate(input_ids)
|
| 14 |
|
| 15 |
-
for
|
| 16 |
print(f"-----partes del output: ({i})")
|
| 17 |
print(tokenizer.decode(output_ids[i], skip_special_tokens=True))
|
| 18 |
print("---")
|
| 19 |
-
}
|
| 20 |
|
| 21 |
# Decode the generated output
|
| 22 |
generated_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
|
|
|
|
| 12 |
input_ids = tokenizer.encode(prompt, return_tensors="pt", max_length=512, truncation=True)
|
| 13 |
output_ids = model.generate(input_ids)
|
| 14 |
|
| 15 |
+
for i in range(len(output_ids)):
|
| 16 |
print(f"-----partes del output: ({i})")
|
| 17 |
print(tokenizer.decode(output_ids[i], skip_special_tokens=True))
|
| 18 |
print("---")
|
|
|
|
| 19 |
|
| 20 |
# Decode the generated output
|
| 21 |
generated_text = tokenizer.decode(output_ids[0], skip_special_tokens=True)
|