lvwerra HF staff commited on
Commit
e8dc8c1
1 Parent(s): b1c5198

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -95,7 +95,7 @@ def generate(prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition
95
  raise ValueError("Chat mode and FIM are mutually exclusive. Choose one or the other.")
96
 
97
  if chat_mode:
98
- chat_prompt = "Human: " + prompt + "\n\nAssistant:"
99
  prompt = HHH_PROMPT + chat_prompt
100
 
101
  if FIM_INDICATOR in prompt:
@@ -111,7 +111,7 @@ def generate(prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition
111
  if fim_mode:
112
  output = prefix
113
  elif chat_mode:
114
- output = chat_prompt
115
  else:
116
  output = prompt
117
 
 
95
  raise ValueError("Chat mode and FIM are mutually exclusive. Choose one or the other.")
96
 
97
  if chat_mode:
98
+ chat_prompt = "Human: " + prompt + "\n\nAssistant: "
99
  prompt = HHH_PROMPT + chat_prompt
100
 
101
  if FIM_INDICATOR in prompt:
 
111
  if fim_mode:
112
  output = prefix
113
  elif chat_mode:
114
+ output = prompt #chat_prompt
115
  else:
116
  output = prompt
117