henry2024 commited on
Commit
cabae0b
1 Parent(s): 940f7b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -108,7 +108,7 @@ with gr.Blocks(css = """#col_container { margin-left: auto; margin-right: auto;}
108
  #tokens = tokens.to(device)
109
  #eos_token_id = tokenizer.eos_token_id
110
  # use the model to generate new tokens.
111
- generated_output = model.generate(**tokens, use_cache=True, max_new_tokens=500, eos_token_id=50256, pad_token_id=50256)
112
 
113
  # Find the position of "Output:" and extract the text after it
114
  generated_text = tokenizer.batch_decode(generated_output)[0]
 
108
  #tokens = tokens.to(device)
109
  #eos_token_id = tokenizer.eos_token_id
110
  # use the model to generate new tokens.
111
+ generated_output = model.generate(**tokens, use_cache=True, max_new_tokens=100, eos_token_id=50256, pad_token_id=50256)
112
 
113
  # Find the position of "Output:" and extract the text after it
114
  generated_text = tokenizer.batch_decode(generated_output)[0]