Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,11 +9,15 @@ HEADERS = {"Authorization": HF_TOKEN}
|
|
9 |
zephyr_7b_beta = os.getenv('zephyr_7b_beta')
|
10 |
zephyr_7b_alpha = os.getenv('zephyr_7b_alpha')
|
11 |
|
|
|
|
|
|
|
12 |
|
13 |
def build_input_prompt(message, chatbot):
|
14 |
"""
|
15 |
Constructs the input prompt string from the chatbot interactions and the current message.
|
16 |
"""
|
|
|
17 |
input_prompt = "<|system|>\n</s>\n<|user|>\n"
|
18 |
for interaction in chatbot:
|
19 |
input_prompt = input_prompt + str(interaction[0]) + "</s>\n<|assistant|>\n" + str(interaction[1]) + "\n</s>\n<|user|>\n"
|
|
|
9 |
zephyr_7b_beta = os.getenv('zephyr_7b_beta')
|
10 |
zephyr_7b_alpha = os.getenv('zephyr_7b_alpha')
|
11 |
|
12 |
+
for interaction in chatbot:
|
13 |
+
input_prompt = input_prompt + str(interaction[0]) + "</s>\n<|assistant|>\n" + str(interaction[1]) + "\n</s>\n<|user|>\n"
|
14 |
+
|
15 |
|
16 |
def build_input_prompt(message, chatbot):
|
17 |
"""
|
18 |
Constructs the input prompt string from the chatbot interactions and the current message.
|
19 |
"""
|
20 |
+
print(f"chatbot is - {chatbot}")
|
21 |
input_prompt = "<|system|>\n</s>\n<|user|>\n"
|
22 |
for interaction in chatbot:
|
23 |
input_prompt = input_prompt + str(interaction[0]) + "</s>\n<|assistant|>\n" + str(interaction[1]) + "\n</s>\n<|user|>\n"
|