Spaces:
Build error
Build error
Commit
·
54bed4f
1
Parent(s):
1e0c655
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ if st.button("Поехали", help="Может занять какое-то в
|
|
32 |
output_sequences = model.generate(
|
33 |
input_ids=encoded_prompt,
|
34 |
max_length=250 + len(encoded_prompt[0]),
|
35 |
-
temperature=1.
|
36 |
top_k=50,
|
37 |
top_p=0.95,
|
38 |
repetition_penalty=1.0,
|
@@ -42,13 +42,13 @@ if st.button("Поехали", help="Может занять какое-то в
|
|
42 |
if len(output_sequences.shape) > 2:
|
43 |
output_sequences.squeeze_()
|
44 |
|
45 |
-
st.title("")
|
46 |
|
47 |
for generated_sequence_idx, generated_sequence in enumerate(output_sequences):
|
48 |
generated_sequence = generated_sequence.tolist()
|
49 |
text = tokenizer.decode(generated_sequence, clean_up_tokenization_spaces=True)
|
50 |
|
51 |
-
text = text[: text.find("</s>") if "</s>" else None]
|
52 |
|
53 |
total_sequence = (
|
54 |
prompt_text + text[len(tokenizer.decode(encoded_prompt[0], clean_up_tokenization_spaces=True)) :]
|
|
|
32 |
output_sequences = model.generate(
|
33 |
input_ids=encoded_prompt,
|
34 |
max_length=250 + len(encoded_prompt[0]),
|
35 |
+
temperature=1.0,
|
36 |
top_k=50,
|
37 |
top_p=0.95,
|
38 |
repetition_penalty=1.0,
|
|
|
42 |
if len(output_sequences.shape) > 2:
|
43 |
output_sequences.squeeze_()
|
44 |
|
45 |
+
st.title("Топовая песня")
|
46 |
|
47 |
for generated_sequence_idx, generated_sequence in enumerate(output_sequences):
|
48 |
generated_sequence = generated_sequence.tolist()
|
49 |
text = tokenizer.decode(generated_sequence, clean_up_tokenization_spaces=True)
|
50 |
|
51 |
+
#text = text[: text.find("</s>") if "</s>" else None]
|
52 |
|
53 |
total_sequence = (
|
54 |
prompt_text + text[len(tokenizer.decode(encoded_prompt[0], clean_up_tokenization_spaces=True)) :]
|