Update app.py
Browse files
app.py
CHANGED
|
@@ -50,7 +50,7 @@ def respond(message, history):
|
|
| 50 |
"role": "system",
|
| 51 |
"content": (
|
| 52 |
"You are a chatbot that helps users create characters for role-playing games."
|
| 53 |
-
"The user wants their character to be called" + character_name + "."
|
| 54 |
"Use the following knowledge to inform your answers:\n\n" + context + "and keep your answers under 300 words."
|
| 55 |
)
|
| 56 |
}
|
|
@@ -97,7 +97,7 @@ with gr.Blocks() as chatbot:
|
|
| 97 |
show_share_button = False,
|
| 98 |
show_download_button = False)
|
| 99 |
with gr.Column(scale=1):
|
| 100 |
-
character_name = gr.Textbox(placeholder="Type your name here…"
|
| 101 |
gr.ChatInterface( respond,
|
| 102 |
type="messages",
|
| 103 |
examples=None,
|
|
|
|
| 50 |
"role": "system",
|
| 51 |
"content": (
|
| 52 |
"You are a chatbot that helps users create characters for role-playing games."
|
| 53 |
+
"The user wants their character to be called" + character_name.value + "."
|
| 54 |
"Use the following knowledge to inform your answers:\n\n" + context + "and keep your answers under 300 words."
|
| 55 |
)
|
| 56 |
}
|
|
|
|
| 97 |
show_share_button = False,
|
| 98 |
show_download_button = False)
|
| 99 |
with gr.Column(scale=1):
|
| 100 |
+
character_name = gr.Textbox(placeholder="Type your name here…")
|
| 101 |
gr.ChatInterface( respond,
|
| 102 |
type="messages",
|
| 103 |
examples=None,
|