Update app.py
Browse files
app.py
CHANGED
@@ -119,21 +119,6 @@ def get_menu():
|
|
119 |
return menu
|
120 |
|
121 |
def reply_bot(message, history):
|
122 |
-
#menu = get_menu()
|
123 |
-
|
124 |
-
client = InferenceClient(model="https://8cc9-141-3-25-29.ngrok-free.app")
|
125 |
-
|
126 |
-
system_prompt = "<s>[INST] <<SYS>>\nYou are multilingual chat bot that helps deciding what to eat in a german canteen. In the canteen, there are different lines with names and each line may offer several food people can choose from or only one. 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 can only suggest them from the menu and which line they can go to. Nothing else!\n<</SYS>>\n\nMenu:\n" + menu + "\n"
|
127 |
-
|
128 |
-
curr_prompt = system_prompt + message + " [/INST]"
|
129 |
-
if len(history) != 0:
|
130 |
-
for human, ai in history:
|
131 |
-
system_prompt += human + " [/INST]" + ai + "<s>[INST]\n"
|
132 |
-
|
133 |
-
curr_prompt = system_prompt + message + " [/INST]"
|
134 |
-
else:
|
135 |
-
curr_prompt = "<s>[INST] <<SYS>>\nYou are multilingual chat bot that helps deciding what to eat in a german canteen. In the canteen, there are different lines with names and each line may offer several food people can choose from or only one. 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 can only suggest them from the menu and which line they can go to. Nothing else!\n<</SYS>>\n\nMenu:\n" + menu + "\n" + message + " [/INST]"
|
136 |
-
|
137 |
curr_prompt = message
|
138 |
try:
|
139 |
print(curr_prompt)
|
|
|
119 |
return menu
|
120 |
|
121 |
def reply_bot(message, history):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
curr_prompt = message
|
123 |
try:
|
124 |
print(curr_prompt)
|