Reverted parallelism workaround
Browse files819 unmodified lines82082182282382482582650 unmodified lines877878879880881882883819 unmodified linesnum_iterations = int(in_num_iterations)top_k = int(in_top_k)if response.endswith(("bye", "Bye", "bye.", "Bye.", "bye!", "Bye!")):del histories[username]return "<div class='chatbot'>Chatbot restarted</div>", historieshistory = histories.get(username, None)convo_hist = (history if history != None else "How are you?<|endoftext|>") + response + eot_token50 unmodified linesconvo_hist = eot_token.join(convo_hist_split)except:del histories[username]return "<div class='chatbot'>Error occured, chatbot restarted</div>", historieshistories[username] = convo_histreturn html, histories819 unmodified lines82082182282382482582650 unmodified lines877878879880881882883819 unmodified linesnum_iterations = int(in_num_iterations)top_k = int(in_top_k)if response.endswith(("bye", "Bye", "bye.", "Bye.", "bye!", "Bye!")):histories[username] = Nonereturn "<div class='chatbot'>Chatbot restarted</div>", historieshistory = histories.get(username, None)convo_hist = (history if history != None else "How are you?<|endoftext|>") + response + eot_token50 unmodified linesconvo_hist = eot_token.join(convo_hist_split)except:histories[username] = Nonereturn "<div class='chatbot'>Error occured, chatbot restarted</div>", historieshistories[username] = convo_histreturn html, histories
app.py+2-2