Update app.py
Browse files
app.py
CHANGED
|
@@ -97,7 +97,7 @@ def chat(input, history=[]):
|
|
| 97 |
return response, history
|
| 98 |
|
| 99 |
|
| 100 |
-
def sqlquery(input
|
| 101 |
|
| 102 |
global conversation_history
|
| 103 |
|
|
@@ -122,11 +122,11 @@ def sqlquery(input, history=[]):
|
|
| 122 |
conversation_history.append(("Bot", sql_response))
|
| 123 |
|
| 124 |
# Build conversation string
|
| 125 |
-
#conversation = "\n".join([f"User: {user_msg}\nBot: {resp_msg}" for user_msg, resp_msg in
|
| 126 |
-
|
| 127 |
|
| 128 |
-
|
| 129 |
-
return sql_response, history
|
| 130 |
|
| 131 |
'''
|
| 132 |
html = "<div class='chatbot'>"
|
|
|
|
| 97 |
return response, history
|
| 98 |
|
| 99 |
|
| 100 |
+
def sqlquery(input): #, history=[]):
|
| 101 |
|
| 102 |
global conversation_history
|
| 103 |
|
|
|
|
| 122 |
conversation_history.append(("Bot", sql_response))
|
| 123 |
|
| 124 |
# Build conversation string
|
| 125 |
+
#conversation = "\n".join([f"User: {user_msg}\nBot: {resp_msg}" for user_msg, resp_msg in conversation_history])
|
| 126 |
+
conversation = "\n".join([f"{sender}: {msg}" for sender, msg in conversation_history])
|
| 127 |
|
| 128 |
+
return conversation
|
| 129 |
+
#return sql_response, history
|
| 130 |
|
| 131 |
'''
|
| 132 |
html = "<div class='chatbot'>"
|