Spaces:
Runtime error
Runtime error
Mustehson
commited on
Commit
·
332cf4d
1
Parent(s):
1d1ec23
Logs to Langsmith
Browse files
app.py
CHANGED
@@ -93,11 +93,10 @@ class SQLExecutorTool(Tool):
|
|
93 |
tool = SQLExecutorTool()
|
94 |
|
95 |
def process_outputs(output) :
|
96 |
-
|
97 |
-
output
|
98 |
-
|
99 |
-
|
100 |
-
return output
|
101 |
|
102 |
@traceable(process_outputs=process_outputs)
|
103 |
def get_visualization(question, schema, table_name):
|
@@ -106,7 +105,7 @@ def get_visualization(question, schema, table_name):
|
|
106 |
'pandas', 'plotly.express',
|
107 |
'seaborn'], max_iterations=10)
|
108 |
results = agent.run(
|
109 |
-
|
110 |
)
|
111 |
|
112 |
return results
|
|
|
93 |
tool = SQLExecutorTool()
|
94 |
|
95 |
def process_outputs(output) :
|
96 |
+
return {
|
97 |
+
'sql': output.get('sql', None),
|
98 |
+
'code': output.get('code', None)
|
99 |
+
}
|
|
|
100 |
|
101 |
@traceable(process_outputs=process_outputs)
|
102 |
def get_visualization(question, schema, table_name):
|
|
|
105 |
'pandas', 'plotly.express',
|
106 |
'seaborn'], max_iterations=10)
|
107 |
results = agent.run(
|
108 |
+
task= prompt.format(question=question, schema=schema, table_name=table_name)
|
109 |
)
|
110 |
|
111 |
return results
|