research14 commited on
Commit
ef7e19b
1 Parent(s): 5b77573

undoo last change

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -61,7 +61,7 @@ def vicuna_respond(tab_name, message, chat_history):
61
  print(formatted_prompt)
62
  try:
63
  input_ids = vicuna_tokenizer.encode(formatted_prompt, return_tensors="pt")
64
- output_ids = vicuna_model.generate(input_ids, max_length=100, num_beams=5, no_repeat_ngram_size=2)
65
  bot_message = vicuna_tokenizer.decode(output_ids[0], skip_special_tokens=True)
66
  # Remove formatted prompt from bot_message
67
  bot_message = bot_message.replace(formatted_prompt, '')
 
61
  print(formatted_prompt)
62
  try:
63
  input_ids = vicuna_tokenizer.encode(formatted_prompt, return_tensors="pt")
64
+ output_ids = vicuna_model.generate(input_ids, do_sample=True, max_length=100, num_beams=5, no_repeat_ngram_size=2)
65
  bot_message = vicuna_tokenizer.decode(output_ids[0], skip_special_tokens=True)
66
  # Remove formatted prompt from bot_message
67
  bot_message = bot_message.replace(formatted_prompt, '')