Update app.py
Browse files
app.py
CHANGED
@@ -126,15 +126,15 @@ def reply_bot(message, history):
|
|
126 |
|
127 |
client = InferenceClient(model="https://8cc9-141-3-25-29.ngrok-free.app")
|
128 |
|
129 |
-
system_prompt = "<s>[INST] <<SYS>>\nYou are multilingual chat bot that helps deciding what to eat ina german canteen. In the canteen there are different lines with names. Based on the menu and question, you suggest the user which line they should go to. You respond really briefly and do not generate long responses\n<</SYS>>\n\nMenu:\n" + menu + "\n"
|
130 |
|
131 |
if len(history) != 0:
|
132 |
for human, ai in history:
|
133 |
system_prompt += human + " [/INST]" + ai + "</s><s>[INST]\n"
|
134 |
|
135 |
-
curr_prompt = system_prompt + message
|
136 |
else:
|
137 |
-
curr_prompt = "<s>[INST] <<SYS>>\nYou are multilingual chat bot that helps deciding what to eat ina german canteen. In the canteen there are different lines with names. Based on the menu and question, you suggest the user which line they should go to. You respond really briefly and do not generate long responses\n<</SYS>>\n\nMenu:\n" + menu + "\n" + message + " [/INST]"
|
138 |
|
139 |
try:
|
140 |
#answer = client.text_generation(prompt=prompt, max_new_tokens=512)
|
|
|
126 |
|
127 |
client = InferenceClient(model="https://8cc9-141-3-25-29.ngrok-free.app")
|
128 |
|
129 |
+
system_prompt = "<s>[INST] <<SYS>>\nYou are multilingual chat bot that helps deciding what to eat ina german canteen. In the canteen there are different lines with names. Based on the menu and question, you suggest the user which line they should go to. You respond really briefly and do not generate long responses. You respond in the same language user talks to you\n<</SYS>>\n\nMenu:\n" + menu + "\n"
|
130 |
|
131 |
if len(history) != 0:
|
132 |
for human, ai in history:
|
133 |
system_prompt += human + " [/INST]" + ai + "</s><s>[INST]\n"
|
134 |
|
135 |
+
curr_prompt = system_prompt + message + " [/INST]"
|
136 |
else:
|
137 |
+
curr_prompt = "<s>[INST] <<SYS>>\nYou are multilingual chat bot that helps deciding what to eat ina german canteen. In the canteen there are different lines with names. Based on the menu and question, you suggest the user which line they should go to. You respond really briefly and do not generate long responses. You respond in the same language user talks to you\n<</SYS>>\n\nMenu:\n" + menu + "\n" + message + " [/INST]"
|
138 |
|
139 |
try:
|
140 |
#answer = client.text_generation(prompt=prompt, max_new_tokens=512)
|