Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -186,11 +186,15 @@ def echo(message, history):
|
|
186 |
return error_message, error_message
|
187 |
|
188 |
def echo_agent(message, history):
|
189 |
-
message="There are 2 df's. If you find a KeyError check for the same in the other df." + "<br>" + message
|
190 |
try:
|
191 |
-
|
192 |
-
|
193 |
-
|
|
|
|
|
|
|
|
|
|
|
194 |
return result
|
195 |
except Exception as e:
|
196 |
error_message = f"An error occurred: {e}"+str(e.with_traceback) + str(e.args)
|
|
|
186 |
return error_message, error_message
|
187 |
|
188 |
def echo_agent(message, history):
|
|
|
189 |
try:
|
190 |
+
response = agent.chat(query, output_type= 'text')
|
191 |
+
explanation = agent.explain()
|
192 |
+
|
193 |
+
result = "Answer: \n"
|
194 |
+
+ '\n' + response + '\n'
|
195 |
+
+ '\n' + "Explanation: \n"
|
196 |
+
+ '\n' + explanation
|
197 |
+
|
198 |
return result
|
199 |
except Exception as e:
|
200 |
error_message = f"An error occurred: {e}"+str(e.with_traceback) + str(e.args)
|