Baptiste Pannier commited on
Commit
376e1fc
1 Parent(s): fca63f5
Files changed (1) hide show
  1. app.py +0 -4
app.py CHANGED
@@ -55,12 +55,10 @@ def generate(
55
  )
56
 
57
  formatted_prompt = format_prompt(prompt, history, system_prompt)
58
- print(formatted_prompt)
59
 
60
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
61
  output = ""
62
 
63
- previous_token = ""
64
  for response in stream:
65
  output += response.token.text
66
 
@@ -69,8 +67,6 @@ def generate(
69
  output = output[:-len(stop_str)]
70
  output = output.rstrip()
71
  yield output
72
-
73
- previous_token = response.token.text
74
  yield output
75
  return output
76
 
 
55
  )
56
 
57
  formatted_prompt = format_prompt(prompt, history, system_prompt)
 
58
 
59
  stream = client.text_generation(formatted_prompt, **generate_kwargs, stream=True, details=True, return_full_text=False)
60
  output = ""
61
 
 
62
  for response in stream:
63
  output += response.token.text
64
 
 
67
  output = output[:-len(stop_str)]
68
  output = output.rstrip()
69
  yield output
 
 
70
  yield output
71
  return output
72