Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -80,7 +80,7 @@ def format_prompt(state, bot_index, character_name, character_description, user_
|
|
80 |
if user_name is None or user_name.strip() == "":
|
81 |
user_name = "You"
|
82 |
|
83 |
-
prompt = f"{character_description}\n
|
84 |
|
85 |
# Get the last num_messages messages from the conversation history
|
86 |
recent_messages = state["history"][bot_index][-num_messages:]
|
@@ -298,7 +298,7 @@ with gr.Blocks() as demo:
|
|
298 |
character_description = gr.Textbox(label="Character Description", value="Ryan is a college student who is always willing to help. He knows a lot about math and coding.", placeholder="Enter character description (max 500 chars)")
|
299 |
|
300 |
with gr.Row():
|
301 |
-
user_name = gr.Textbox(label="Your Name", value="
|
302 |
# ...
|
303 |
|
304 |
reset_btn.click(clear_chat, inputs=[state], outputs=[state, chatbot1, chatbot2, upvote_btn_a, upvote_btn_b, textbox, submit_btn])
|
|
|
80 |
if user_name is None or user_name.strip() == "":
|
81 |
user_name = "You"
|
82 |
|
83 |
+
prompt = f"{character_description}\n{character_name}: Hi!\n"
|
84 |
|
85 |
# Get the last num_messages messages from the conversation history
|
86 |
recent_messages = state["history"][bot_index][-num_messages:]
|
|
|
298 |
character_description = gr.Textbox(label="Character Description", value="Ryan is a college student who is always willing to help. He knows a lot about math and coding.", placeholder="Enter character description (max 500 chars)")
|
299 |
|
300 |
with gr.Row():
|
301 |
+
user_name = gr.Textbox(label="Your Name", value="User", placeholder="Enter your name (max 20 chars)")
|
302 |
# ...
|
303 |
|
304 |
reset_btn.click(clear_chat, inputs=[state], outputs=[state, chatbot1, chatbot2, upvote_btn_a, upvote_btn_b, textbox, submit_btn])
|