Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -484,7 +484,7 @@ def main():
|
|
484 |
|
485 |
# Chat Interface
|
486 |
chatbot = gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel")
|
487 |
-
chatbot.load(examples)
|
488 |
|
489 |
# Input Components
|
490 |
message = gr.Textbox(label="Enter your message", placeholder="Ask me anything!")
|
@@ -508,6 +508,8 @@ def main():
|
|
508 |
# Chat App Logic Tab
|
509 |
with gr.Tab("Chat App"):
|
510 |
history = gr.State([])
|
|
|
|
|
511 |
|
512 |
# Connect components to the chat app logic
|
513 |
submit_button.click(chat_app_logic, inputs=[message, history, purpose, agent_name, sys_prompt, temperature, max_new_tokens, top_p, repetition_penalty], outputs=chatbot)
|
|
|
484 |
|
485 |
# Chat Interface
|
486 |
chatbot = gr.Chatbot(show_label=False, show_share_button=False, show_copy_button=True, likeable=True, layout="panel")
|
487 |
+
#chatbot.load(examples)
|
488 |
|
489 |
# Input Components
|
490 |
message = gr.Textbox(label="Enter your message", placeholder="Ask me anything!")
|
|
|
508 |
# Chat App Logic Tab
|
509 |
with gr.Tab("Chat App"):
|
510 |
history = gr.State([])
|
511 |
+
for example in examples:
|
512 |
+
gr.Button(value=example[0]).click(lambda: chat_app_logic(example[0], history, purpose, agent_name, sys_prompt, temperature, max_new_tokens, top_p, repetition_penalty), outputs=chatbot)
|
513 |
|
514 |
# Connect components to the chat app logic
|
515 |
submit_button.click(chat_app_logic, inputs=[message, history, purpose, agent_name, sys_prompt, temperature, max_new_tokens, top_p, repetition_penalty], outputs=chatbot)
|