Spaces:
Paused
Paused
Update app.py
Browse files15 unmodified lines1617181920212223245 unmodified lines303132333435363715 unmodified linesdef respond(message, history):messages = [{"role": "system", "content": "You are Spartacus, a helpful assistant."}]for user_msg, bot_msg in history:messages.append({"role": "user", "content": user_msg})messages.append({"role": "assistant", "content": bot_msg})messages.append({"role": "user", "content": message})input_ids = tokenizer.apply_chat_template(5 unmodified linesgenerate_kwargs = dict(input_ids=input_ids,streamer=streamer,max_new_tokens=1024,temperature=0.7,top_p=0.9,do_sample=True,)15 unmodified lines16171819202122235 unmodified lines2930313233343515 unmodified linesdef respond(message, history):messages = [{"role": "system", "content": "You are Spartacus, a helpful assistant."}]for msg in history:messages.append({"role": msg["role"], "content": msg["content"]})messages.append({"role": "user", "content": message})input_ids = tokenizer.apply_chat_template(5 unmodified linesgenerate_kwargs = dict(input_ids=input_ids,streamer=streamer,temperature=0.5,top_p=0.9,do_sample=True,)
app.py+3-5