ArmelR commited on
Commit
82dd2cd
·
1 Parent(s): 25a8247

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -107,9 +107,9 @@ def generate(
107
 
108
  output = ""
109
  previous_token = ""
110
- t = 0
111
  for response in stream:
112
- print(f"IN_{t}")
113
  if (
114
  (response.token.text in ["Human", "-----", "Question:"] and previous_token in ["\n", "-----"])
115
  or response.token.text in ["<|endoftext|>", "<|end|>", "Answer:"]
@@ -119,7 +119,7 @@ def generate(
119
  else:
120
  output += response.token.text
121
  #print(f"Out_{t} : {output}")
122
- t += 1
123
  previous_token = response.token.text
124
  print("Output = "+str(output))
125
  return output.strip()
 
107
 
108
  output = ""
109
  previous_token = ""
110
+ #t = 0
111
  for response in stream:
112
+ #print(f"IN_{t}")
113
  if (
114
  (response.token.text in ["Human", "-----", "Question:"] and previous_token in ["\n", "-----"])
115
  or response.token.text in ["<|endoftext|>", "<|end|>", "Answer:"]
 
119
  else:
120
  output += response.token.text
121
  #print(f"Out_{t} : {output}")
122
+ #t += 1
123
  previous_token = response.token.text
124
  print("Output = "+str(output))
125
  return output.strip()