Update app.py
Browse files
app.py
CHANGED
@@ -99,7 +99,11 @@ def chat(message,history):
|
|
99 |
similar_chat_history += chats
|
100 |
|
101 |
#prompt = f"<|user|>\n{message}<|end|>\n<|assistant|>"
|
102 |
-
|
|
|
|
|
|
|
|
|
103 |
|
104 |
# print(user_input)
|
105 |
# print('-'*20)
|
@@ -120,8 +124,7 @@ def chat(message,history):
|
|
120 |
|
121 |
|
122 |
|
123 |
-
|
124 |
-
return '\n'.join(top_7_cells)
|
125 |
|
126 |
demo = gr.ChatInterface(chat, multimodal=True)
|
127 |
|
|
|
99 |
similar_chat_history += chats
|
100 |
|
101 |
#prompt = f"<|user|>\n{message}<|end|>\n<|assistant|>"
|
102 |
+
|
103 |
+
top_7_cells_string = '\n'.join(top_7_cells)
|
104 |
+
context_plus_message = top_7_cells_string + message['text']
|
105 |
+
formatted_context_plus_message = user_prompt_template(context_plus_message)
|
106 |
+
user_input = similar_chat_history + formatted_context_plus_message
|
107 |
|
108 |
# print(user_input)
|
109 |
# print('-'*20)
|
|
|
124 |
|
125 |
|
126 |
|
127 |
+
return formatted_assistant_msg
|
|
|
128 |
|
129 |
demo = gr.ChatInterface(chat, multimodal=True)
|
130 |
|