Update app.py
Browse files
app.py
CHANGED
@@ -620,6 +620,13 @@ def generate_OG(prompt, history, agent_name=agents[0], sys_prompt="", temperatur
|
|
620 |
return prompt, history, summary[0],json_obj,json_hist,html_out
|
621 |
|
622 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
623 |
|
624 |
|
625 |
with gr.Blocks() as app:
|
@@ -628,10 +635,9 @@ with gr.Blocks() as app:
|
|
628 |
post_handler=gr.State()
|
629 |
html = gr.HTML()
|
630 |
|
631 |
-
chatbot=gr.Chatbot()
|
632 |
msg = gr.Textbox()
|
633 |
with gr.Row():
|
634 |
-
|
635 |
submit_b = gr.Button("Blog Post")
|
636 |
submit_c = gr.Button("Comment")
|
637 |
submit_r = gr.Button("OP Reply")
|
@@ -642,7 +648,12 @@ with gr.Blocks() as app:
|
|
642 |
with gr.Row():
|
643 |
m_choice=gr.Dropdown(label="Models",type='index',choices=[c for c in models],value=models[0],interactive=True)
|
644 |
tokens = gr.Slider(label="Max new tokens",value=1600,minimum=0,maximum=8000,step=64,interactive=True, visible=True,info="The maximum number of tokens")
|
645 |
-
|
|
|
|
|
|
|
|
|
|
|
646 |
sumbox=gr.Textbox("Summary", max_lines=100)
|
647 |
with gr.Column():
|
648 |
sum_out_box=gr.JSON(label="Summaries")
|
|
|
620 |
return prompt, history, summary[0],json_obj,json_hist,html_out
|
621 |
|
622 |
|
623 |
+
persona=[
|
624 |
+
{"name":"Mr. Nice Guy", "description":"Nice","personality":"friendly, caring, helpful and informative. You always compliment people, and stick up for them, and you have no patience for bullies."},
|
625 |
+
{"name":"Mr. Mean Guy", "description":"Mean","personality":"a total asshole. You think you are really smart, but really you are just ignorant and mean. You don't have time for everybodies stupidity, and you let them know that in the comments."},
|
626 |
+
{"name":"Smarty Pants", "description":"Genius","personality":"intelligent, informative, know-it-all. You are the smartest guy in the room and always one-up the blog poster to show how mart you are."},
|
627 |
+
{"name":"Try Hard", "description":"Not Genius","personality":"dimwitted, lacking understanding about any topic. You always ask really irrelevant questions about the post."},
|
628 |
+
{"name":"Class Clown", "description":"Humerous","personality":"humerous, funny. You turn everything into a joke. Make a joke about the post."},
|
629 |
+
]
|
630 |
|
631 |
|
632 |
with gr.Blocks() as app:
|
|
|
635 |
post_handler=gr.State()
|
636 |
html = gr.HTML()
|
637 |
|
638 |
+
chatbot=gr.Chatbot(visible=False)
|
639 |
msg = gr.Textbox()
|
640 |
with gr.Row():
|
|
|
641 |
submit_b = gr.Button("Blog Post")
|
642 |
submit_c = gr.Button("Comment")
|
643 |
submit_r = gr.Button("OP Reply")
|
|
|
648 |
with gr.Row():
|
649 |
m_choice=gr.Dropdown(label="Models",type='index',choices=[c for c in models],value=models[0],interactive=True)
|
650 |
tokens = gr.Slider(label="Max new tokens",value=1600,minimum=0,maximum=8000,step=64,interactive=True, visible=True,info="The maximum number of tokens")
|
651 |
+
with gr.Row():
|
652 |
+
#persona1=gr.Textbox(label="Bot 1 Persona",info="Your personallity can be be described as...")
|
653 |
+
#persona2=gr.Textbox(label="Bot 2 Persona",info="Your personallity can be be described as...")
|
654 |
+
persona1=gr.Dropdown(label="Bot 1 Persona", choices=[p for p in persona[0]['name']])
|
655 |
+
persona2=gr.Dropdown(label="Bot 2 Persona", choices=[p for p in persona[0]['name']])
|
656 |
+
|
657 |
sumbox=gr.Textbox("Summary", max_lines=100)
|
658 |
with gr.Column():
|
659 |
sum_out_box=gr.JSON(label="Summaries")
|