orzhan commited on
Commit
f991e69
·
1 Parent(s): c14132c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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=60,
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 = 275)
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
- sent + text[len(tokenizer.decode(encoded_prompt[0], clean_up_tokenization_spaces=True)) :]
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)