Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ def infer(input_ids):
|
|
| 16 |
|
| 17 |
output_sequences = model.generate(
|
| 18 |
input_ids=input_ids,
|
| 19 |
-
max_length=
|
| 20 |
do_sample=False,
|
| 21 |
num_return_sequences=1,
|
| 22 |
num_beams=32,
|
|
@@ -29,7 +29,7 @@ default_value = "А ну иди сюда, придурок"
|
|
| 29 |
|
| 30 |
#prompts
|
| 31 |
st.title("Дело детоксификации на ruT5")
|
| 32 |
-
sent = st.text_area("Text", default_value, height =
|
| 33 |
|
| 34 |
|
| 35 |
|
|
@@ -56,7 +56,7 @@ for generated_sequence_idx, generated_sequence in enumerate(output_sequences):
|
|
| 56 |
|
| 57 |
# Add the prompt at the beginning of the sequence. Remove the excess text that was used for pre-processing
|
| 58 |
total_sequence = (
|
| 59 |
-
|
| 60 |
)
|
| 61 |
|
| 62 |
generated_sequences.append(total_sequence)
|
|
|
|
| 16 |
|
| 17 |
output_sequences = model.generate(
|
| 18 |
input_ids=input_ids,
|
| 19 |
+
max_length=40,
|
| 20 |
do_sample=False,
|
| 21 |
num_return_sequences=1,
|
| 22 |
num_beams=32,
|
|
|
|
| 29 |
|
| 30 |
#prompts
|
| 31 |
st.title("Дело детоксификации на ruT5")
|
| 32 |
+
sent = st.text_area("Text", default_value, height = 27)
|
| 33 |
|
| 34 |
|
| 35 |
|
|
|
|
| 56 |
|
| 57 |
# Add the prompt at the beginning of the sequence. Remove the excess text that was used for pre-processing
|
| 58 |
total_sequence = (
|
| 59 |
+
text
|
| 60 |
)
|
| 61 |
|
| 62 |
generated_sequences.append(total_sequence)
|