snoop2head commited on
Commit
ff265c5
1 Parent(s): 17706eb
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -38,18 +38,13 @@ else:
38
  # translate into english sentence
39
 
40
  translation_result = model.generate(
41
- **tokenizer(
42
  src_text,
43
  return_tensors="pt",
44
  padding="max_length",
45
  truncation=True,
46
  max_length=64,
47
- ),
48
- max_length=64,
49
- num_beams=5,
50
- repetition_penalty=1.3,
51
- no_repeat_ngram_size=3,
52
- num_return_sequences=1,
53
  )
54
  translation_result = tokenizer.decode(
55
  translation_result[0],
 
38
  # translate into english sentence
39
 
40
  translation_result = model.generate(
41
+ tokenizer(
42
  src_text,
43
  return_tensors="pt",
44
  padding="max_length",
45
  truncation=True,
46
  max_length=64,
47
+ ).input_ids,
 
 
 
 
 
48
  )
49
  translation_result = tokenizer.decode(
50
  translation_result[0],