Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,9 +47,10 @@ else:
|
|
| 47 |
output_sequences = infer(input_ids, max_length, temperature, top_k, top_p, num_return_sequences)
|
| 48 |
|
| 49 |
|
|
|
|
| 50 |
for generated_sequence_idx, generated_sequence in enumerate(output_sequences):
|
| 51 |
print(f"=== GENERATED SEQUENCE {generated_sequence_idx + 1} ===")
|
| 52 |
-
|
| 53 |
|
| 54 |
# Decode text
|
| 55 |
text = tokenizer.decode(generated_sequence, clean_up_tokenization_spaces=True)
|
|
|
|
| 47 |
output_sequences = infer(input_ids, max_length, temperature, top_k, top_p, num_return_sequences)
|
| 48 |
|
| 49 |
|
| 50 |
+
|
| 51 |
for generated_sequence_idx, generated_sequence in enumerate(output_sequences):
|
| 52 |
print(f"=== GENERATED SEQUENCE {generated_sequence_idx + 1} ===")
|
| 53 |
+
generated_sequences = generated_sequence.tolist()
|
| 54 |
|
| 55 |
# Decode text
|
| 56 |
text = tokenizer.decode(generated_sequence, clean_up_tokenization_spaces=True)
|