zachlopez commited on
Commit
d0987a0
1 Parent(s): 0f17027

Fixed parallelism issue

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ def get_reply(response, username = None, histories = {}):
13
  history = histories.get(username, [])
14
  history.append(response)
15
  if response.endswith(("bye", "Bye", "bye.", "Bye.")):
16
- history[username] = []
17
  return "<div class='chatbot'>Chatbot restarted</div>", histories
18
  if len(history) > 4: history = history[-4:]
19
  inputs = tokenizer(" ".join(history), return_tensors="pt")
 
13
  history = histories.get(username, [])
14
  history.append(response)
15
  if response.endswith(("bye", "Bye", "bye.", "Bye.")):
16
+ histories[username] = []
17
  return "<div class='chatbot'>Chatbot restarted</div>", histories
18
  if len(history) > 4: history = history[-4:]
19
  inputs = tokenizer(" ".join(history), return_tensors="pt")