hussamalafandi commited on
Commit
90aea8c
·
1 Parent(s): 7976834

Refactor respond function to set model parameters before processing dialog history

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -17,8 +17,12 @@ def respond(
17
  """
18
  Respond to user input using the model.
19
  """
20
- history_langchain_format = []
 
 
 
21
 
 
22
  # Add the dialog history to the history
23
  for msg in dialog_history:
24
  if msg['role'] == "user":
 
17
  """
18
  Respond to user input using the model.
19
  """
20
+ # Set the model parameters
21
+ model.temperature = temperature
22
+ model.top_p = top_p
23
+ model.max_output_tokens = max_new_tokens
24
 
25
+ history_langchain_format = []
26
  # Add the dialog history to the history
27
  for msg in dialog_history:
28
  if msg['role'] == "user":