felixz commited on
Commit
a6a592a
·
1 Parent(s): b72f7a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -40,7 +40,8 @@ def text2text(input_text):
40
  print("Length of input: " + str(len(input_text)))
41
 
42
  # Does not seem to care if it goes over 512... humm...
43
- outputs = model.generate(input_ids, max_new_tokens=512, do_sample=True, temperature=0.7, top_p=0.8)
 
44
 
45
  # Remove <pad> and </s> eof sequence tokens
46
  model_output_text = tokenizer.decode(outputs[0],skip_special_tokens=True)
 
40
  print("Length of input: " + str(len(input_text)))
41
 
42
  # Does not seem to care if it goes over 512... humm...
43
+ # To make it faster generate 100 tokens at a time
44
+ outputs = model.generate(input_ids, max_new_tokens=100, do_sample=True, temperature=0.7, top_p=0.8)
45
 
46
  # Remove <pad> and </s> eof sequence tokens
47
  model_output_text = tokenizer.decode(outputs[0],skip_special_tokens=True)