Vitrous commited on
Commit
7600265
·
verified ·
1 Parent(s): 4b87e64

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -118,6 +118,7 @@ def hermes_generate_response(msg_prompt: str) -> dict:
118
  Returns:
119
  dict: A dictionary containing the user's message prompt and the model's response.
120
  """
 
121
  pipe = pipeline("text-generation",model=model, tokenizer=tokenizer, **generation_params)
122
  try:
123
  prompt_template=f'''<|im_start|>system
 
118
  Returns:
119
  dict: A dictionary containing the user's message prompt and the model's response.
120
  """
121
+ generation_params = {"do_sample": True,"temperature": 0.7,"top_p": 0.95,"top_k": 40,"max_new_tokens": 512,"repetition_penalty": 1.1}
122
  pipe = pipeline("text-generation",model=model, tokenizer=tokenizer, **generation_params)
123
  try:
124
  prompt_template=f'''<|im_start|>system