teaevo commited on
Commit
fd2320e
1 Parent(s): 29d45a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -97,7 +97,7 @@ def chat(input, history=[]):
97
  return response, history
98
 
99
 
100
- def sqlquery(input, history=[]):
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 history])
126
- #conversation = "\n".join([f"{sender}: {msg}" for sender, msg in history])
127
 
128
- #return conversation
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'>"