Fixed parallelism issue
Browse files12 unmodified lines1314151617181912 unmodified lineshistory = histories.get(username, [])history.append(response)if response.endswith(("bye", "Bye", "bye.", "Bye.")):history[username] = []return "<div class='chatbot'>Chatbot restarted</div>", historiesif len(history) > 4: history = history[-4:]inputs = tokenizer(" ".join(history), return_tensors="pt")12 unmodified lines1314151617181912 unmodified lineshistory = histories.get(username, [])history.append(response)if response.endswith(("bye", "Bye", "bye.", "Bye.")):histories[username] = []return "<div class='chatbot'>Chatbot restarted</div>", historiesif len(history) > 4: history = history[-4:]inputs = tokenizer(" ".join(history), return_tensors="pt")
app.py+1-1