NCTCMumbai commited on
Commit
10484e2
1 Parent(s): 1bcb5ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -108,9 +108,10 @@ def bot(history, api_kind):
108
  count_tokens = lambda text: len([token.strip() for token in text.split() if token.strip()])
109
  print(prompt_html,'token count is',count_tokens(prompt_html))
110
  history[-1][1] = ""
111
- for character in generate_fn(prompt, history[:-1]):
112
- history[-1][1] = character
113
- #yield history, prompt_html
 
114
  print('final history is ',history)
115
  return history[-1][1], prompt_html
116
 
 
108
  count_tokens = lambda text: len([token.strip() for token in text.split() if token.strip()])
109
  print(prompt_html,'token count is',count_tokens(prompt_html))
110
  history[-1][1] = ""
111
+ # for character in generate_fn(prompt, history[:-1]):
112
+ # history[-1][1] = character
113
+ # #yield history, prompt_html
114
+ history[-1][1] =generate_fn(prompt, history[:-1])
115
  print('final history is ',history)
116
  return history[-1][1], prompt_html
117