ColeGuion commited on
Commit
2f057c9
·
verified ·
1 Parent(s): e53bb43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,14 +9,14 @@ client = InferenceClient(
9
  def format_prompt(message, history):
10
  prompt = "<s>"
11
  for user_prompt, bot_response in history:
 
12
  prompt += f"[INST] {user_prompt} [/INST]"
13
  prompt += f" {bot_response}</s> "
 
14
  prompt += f"[INST] {message} [/INST]"
15
  return prompt
16
 
17
  def generate(prompt, history, system_prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0):
18
- dashes = "-"*100 + "\n"
19
- print(dashes + "\n\nHELLO THIS IS COLE\n\n\n" + dashes)
20
  temperature = float(temperature)
21
  if temperature < 1e-2:
22
  temperature = 1e-2
 
9
  def format_prompt(message, history):
10
  prompt = "<s>"
11
  for user_prompt, bot_response in history:
12
+ print("USER PROMPT: '{}' \nBOT RESPONSE: '{}'".format(user_prompt, bot_response))
13
  prompt += f"[INST] {user_prompt} [/INST]"
14
  prompt += f" {bot_response}</s> "
15
+ print("MSG: '{}'".format(message))
16
  prompt += f"[INST] {message} [/INST]"
17
  return prompt
18
 
19
  def generate(prompt, history, system_prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0):
 
 
20
  temperature = float(temperature)
21
  if temperature < 1e-2:
22
  temperature = 1e-2