Update app.py
Browse files
app.py
CHANGED
@@ -380,6 +380,7 @@ def load_html_OG(inp,title):
|
|
380 |
|
381 |
|
382 |
def generate(prompt, history, post_check,full_conv,persona1, agent_name=agents[0], sys_prompt="", temperature=0.9, max_new_tokens=1048, top_p=0.95, repetition_penalty=1.0):
|
|
|
383 |
html_out=""
|
384 |
#main_point[0]=prompt
|
385 |
#print(datetime.datetime.now())
|
@@ -673,10 +674,10 @@ with gr.Blocks() as app:
|
|
673 |
#app.load(load_models,m_choice,[chatbot]).then(load_html,None,html)
|
674 |
app.load(load_models,m_choice,[chatbot])
|
675 |
|
676 |
-
sub_b = submit_b.click(generate, [msg,chatbot,post_handler,chat_handler,
|
677 |
sub_c = submit_c.click(comment_generate, [msg,chatbot,post_handler,chat_handler,persona2],[msg,chatbot,sumbox,sum_out_box,hist_out_box,html])
|
678 |
sub_r = submit_r.click(reply_generate, [msg,chatbot,post_handler,chat_handler,persona1],[msg,chatbot,sumbox,sum_out_box,hist_out_box,html])
|
679 |
-
sub_e = msg.submit(generate, [msg,chatbot,post_handler,chat_handler,chat_handler,tokens],[msg,chatbot,post_handler,chat_handler,sumbox,sum_out_box,hist_out_box,html])
|
680 |
stop_b.click(None,None,None, cancels=[sub_b,sub_e,sub_c,sub_r])
|
681 |
|
682 |
app.queue(default_concurrency_limit=20).launch()
|
|
|
380 |
|
381 |
|
382 |
def generate(prompt, history, post_check,full_conv,persona1, agent_name=agents[0], sys_prompt="", temperature=0.9, max_new_tokens=1048, top_p=0.95, repetition_penalty=1.0):
|
383 |
+
print(persona1)
|
384 |
html_out=""
|
385 |
#main_point[0]=prompt
|
386 |
#print(datetime.datetime.now())
|
|
|
674 |
#app.load(load_models,m_choice,[chatbot]).then(load_html,None,html)
|
675 |
app.load(load_models,m_choice,[chatbot])
|
676 |
|
677 |
+
sub_b = submit_b.click(generate, [msg,chatbot,post_handler,chat_handler,persona1,tokens],[msg,chatbot,post_handler,chat_handler,sumbox,sum_out_box,hist_out_box,html])
|
678 |
sub_c = submit_c.click(comment_generate, [msg,chatbot,post_handler,chat_handler,persona2],[msg,chatbot,sumbox,sum_out_box,hist_out_box,html])
|
679 |
sub_r = submit_r.click(reply_generate, [msg,chatbot,post_handler,chat_handler,persona1],[msg,chatbot,sumbox,sum_out_box,hist_out_box,html])
|
680 |
+
sub_e = msg.submit(generate, [msg,chatbot,post_handler,chat_handler,chat_handler,persona1,tokens],[msg,chatbot,post_handler,chat_handler,sumbox,sum_out_box,hist_out_box,html])
|
681 |
stop_b.click(None,None,None, cancels=[sub_b,sub_e,sub_c,sub_r])
|
682 |
|
683 |
app.queue(default_concurrency_limit=20).launch()
|