Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -57,6 +57,15 @@ for row in subject_rows:
|
|
| 57 |
# --- Define SQL tool for the agent ---
|
| 58 |
@tool
|
| 59 |
def sql_engine(query: str) -> list:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
try:
|
| 61 |
print(f"🧩 Executing query: {query}") # Debug log
|
| 62 |
with engine.connect() as con:
|
|
|
|
| 57 |
# --- Define SQL tool for the agent ---
|
| 58 |
@tool
|
| 59 |
def sql_engine(query: str) -> list:
|
| 60 |
+
"""
|
| 61 |
+
Executes SQL queries on the available tables: students and subjects.
|
| 62 |
+
|
| 63 |
+
Args:
|
| 64 |
+
query: SQL query string.
|
| 65 |
+
|
| 66 |
+
Returns:
|
| 67 |
+
List of tuples with query results.
|
| 68 |
+
"""
|
| 69 |
try:
|
| 70 |
print(f"🧩 Executing query: {query}") # Debug log
|
| 71 |
with engine.connect() as con:
|