Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -69,15 +69,18 @@ with gr.Blocks() as demo:
|
|
| 69 |
e5390g37096_core.playerNr = e5390g37096_decisions.playerNr
|
| 70 |
WHERE e5390g37096_decisions.session_index = '{session_index}'
|
| 71 |
"""
|
| 72 |
-
|
| 73 |
try:
|
| 74 |
cursor.execute(query)
|
| 75 |
-
|
|
|
|
| 76 |
rows = cursor.fetchall()
|
| 77 |
-
|
| 78 |
# Close the database connection
|
| 79 |
conn.close()
|
|
|
|
| 80 |
return [list(row) for row in rows] # Convert each row to a list
|
|
|
|
| 81 |
except mysql.connector.Error as err:
|
| 82 |
print(f"Error: {err}")
|
| 83 |
return None
|
|
|
|
| 69 |
e5390g37096_core.playerNr = e5390g37096_decisions.playerNr
|
| 70 |
WHERE e5390g37096_decisions.session_index = '{session_index}'
|
| 71 |
"""
|
| 72 |
+
|
| 73 |
try:
|
| 74 |
cursor.execute(query)
|
| 75 |
+
|
| 76 |
+
# Fetch all rows as lists of tuples
|
| 77 |
rows = cursor.fetchall()
|
| 78 |
+
|
| 79 |
# Close the database connection
|
| 80 |
conn.close()
|
| 81 |
+
|
| 82 |
return [list(row) for row in rows] # Convert each row to a list
|
| 83 |
+
|
| 84 |
except mysql.connector.Error as err:
|
| 85 |
print(f"Error: {err}")
|
| 86 |
return None
|