Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ def generate(
|
|
35 |
)
|
36 |
|
37 |
if shouldoverridehistory:
|
38 |
-
history =
|
39 |
|
40 |
formatted_prompt = format_prompt(prompt, history, format_sys_prompt(username, botname, botpersonality, botexamplechat, chatsituation))
|
41 |
|
@@ -63,7 +63,7 @@ demo = gr.ChatInterface(fn=generate,
|
|
63 |
gr.Textbox(label="Example of bot chat", lines=3, value='<"Oh hey Jake!"> She said to Jake as he hurries to him. <"How are you?">'),
|
64 |
gr.Textbox(label="Current conversation situation", lines=2, value="It was a Friday afternoon, after-school hours, it was outside of school. Jake and Janet met each other at the entrance of the school."),
|
65 |
gr.Checkbox(label="Override history: History should be in the following format: user-bot-user-bot-user-...\nOverride history should be checked in order for it to be effective. Override primarily only used for APIs.", value=False),
|
66 |
-
gr.List(label="History", value=None, row_count=(1, "fixed")),
|
67 |
gr.Slider(label="Max new tokens", maximum=2048, value=512)
|
68 |
]
|
69 |
)
|
|
|
35 |
)
|
36 |
|
37 |
if shouldoverridehistory:
|
38 |
+
history = historyoverride
|
39 |
|
40 |
formatted_prompt = format_prompt(prompt, history, format_sys_prompt(username, botname, botpersonality, botexamplechat, chatsituation))
|
41 |
|
|
|
63 |
gr.Textbox(label="Example of bot chat", lines=3, value='<"Oh hey Jake!"> She said to Jake as he hurries to him. <"How are you?">'),
|
64 |
gr.Textbox(label="Current conversation situation", lines=2, value="It was a Friday afternoon, after-school hours, it was outside of school. Jake and Janet met each other at the entrance of the school."),
|
65 |
gr.Checkbox(label="Override history: History should be in the following format: user-bot-user-bot-user-...\nOverride history should be checked in order for it to be effective. Override primarily only used for APIs.", value=False),
|
66 |
+
gr.List(label="History", value=None, row_count=(1, "fixed"), headers=None),
|
67 |
gr.Slider(label="Max new tokens", maximum=2048, value=512)
|
68 |
]
|
69 |
)
|