Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -149,7 +149,7 @@ def table_description():
|
|
| 149 |
Returns:
|
| 150 |
table_description (String): The table's column names and their data types.
|
| 151 |
"""
|
| 152 |
-
|
| 153 |
try:
|
| 154 |
columns_info = [(col["name"], col["type"]) for col in inspector.get_columns(PATHS.TABLE_NAME)]
|
| 155 |
table_description = "Columns:\n" + "\n".join([f" - {name}: {col_type}" for name, col_type in columns_info])
|
|
|
|
| 149 |
Returns:
|
| 150 |
table_description (String): The table's column names and their data types.
|
| 151 |
"""
|
| 152 |
+
inspector = inspect(engine)
|
| 153 |
try:
|
| 154 |
columns_info = [(col["name"], col["type"]) for col in inspector.get_columns(PATHS.TABLE_NAME)]
|
| 155 |
table_description = "Columns:\n" + "\n".join([f" - {name}: {col_type}" for name, col_type in columns_info])
|