Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -49,12 +49,15 @@ for generated_sequence_idx, generated_sequence in enumerate(output_sequences):
|
|
49 |
#text = text[: text.find(args.stop_token) if args.stop_token else None]
|
50 |
# Add the prompt at the beginning of the sequence. Remove the excess text that was used for pre-processing
|
51 |
total_sequence = (
|
52 |
-
sent + text[len(tokenizer.decode(encoded_prompt[0], clean_up_tokenization_spaces=True)) :]
|
53 |
)
|
54 |
generated_sequences.append(total_sequence)
|
55 |
print(total_sequence)
|
56 |
old = generated_sequences[-1]
|
57 |
|
58 |
-
|
|
|
59 |
#st.write(generated_sequences[-1])
|
60 |
-
|
|
|
|
|
|
49 |
#text = text[: text.find(args.stop_token) if args.stop_token else None]
|
50 |
# Add the prompt at the beginning of the sequence. Remove the excess text that was used for pre-processing
|
51 |
total_sequence = (
|
52 |
+
st.session_state.catch_gen + sent + text[len(tokenizer.decode(encoded_prompt[0], clean_up_tokenization_spaces=True)) :]
|
53 |
)
|
54 |
generated_sequences.append(total_sequence)
|
55 |
print(total_sequence)
|
56 |
old = generated_sequences[-1]
|
57 |
|
58 |
+
|
59 |
+
|
60 |
#st.write(generated_sequences[-1])
|
61 |
+
st.session_state.catch_gen = generated_sequences[-1]
|
62 |
+
st.write(st.session_state.catch_gen)
|
63 |
+
|