Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,6 @@ def build_input_prompt(message, chatbot):
|
|
14 |
"""
|
15 |
Constructs the input prompt string from the chatbot interactions and the current message.
|
16 |
"""
|
17 |
-
print(f"chatbot is - {chatbot}")
|
18 |
input_prompt = "<|system|>\n</s>\n<|user|>\n"
|
19 |
for interaction in chatbot:
|
20 |
input_prompt = input_prompt + str(interaction[0]) + "</s>\n<|assistant|>\n" + str(interaction[1]) + "\n</s>\n<|user|>\n"
|
@@ -45,7 +44,7 @@ def predict_beta(message, chatbot=[], temperature=0.9, max_new_tokens=256, top_p
|
|
45 |
temperature = float(temperature)
|
46 |
top_p = float(top_p)
|
47 |
|
48 |
-
input_prompt = build_input_prompt(
|
49 |
|
50 |
data = {
|
51 |
"inputs": input_prompt,
|
@@ -86,7 +85,7 @@ def predict_alpha(message, chatbot=[], temperature=0.9, max_new_tokens=256, top_
|
|
86 |
temperature = float(temperature)
|
87 |
top_p = float(top_p)
|
88 |
|
89 |
-
input_prompt = build_input_prompt(
|
90 |
|
91 |
data = {
|
92 |
"inputs": input_prompt,
|
|
|
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"
|
|
|
44 |
temperature = float(temperature)
|
45 |
top_p = float(top_p)
|
46 |
|
47 |
+
input_prompt = build_input_prompt(message, chatbot)
|
48 |
|
49 |
data = {
|
50 |
"inputs": input_prompt,
|
|
|
85 |
temperature = float(temperature)
|
86 |
top_p = float(top_p)
|
87 |
|
88 |
+
input_prompt = build_input_prompt(message, chatbot)
|
89 |
|
90 |
data = {
|
91 |
"inputs": input_prompt,
|