Spaces:
Sleeping
Sleeping
Update src/chat.py
Browse files- src/chat.py +6 -6
src/chat.py
CHANGED
|
@@ -984,12 +984,12 @@ def render_chat_tab(conn):
|
|
| 984 |
|
| 985 |
if intent == "order_status":
|
| 986 |
if table_cols and table_rows:
|
| 987 |
-
|
| 988 |
-
|
| 989 |
-
|
| 990 |
-
|
| 991 |
-
|
| 992 |
-
|
| 993 |
else:
|
| 994 |
if table_cols and table_rows:
|
| 995 |
st.markdown('<div class="table-card">', unsafe_allow_html=True)
|
|
|
|
| 984 |
|
| 985 |
if intent == "order_status":
|
| 986 |
if table_cols and table_rows:
|
| 987 |
+
try:
|
| 988 |
+
df = pd.DataFrame(table_rows, columns=table_cols)
|
| 989 |
+
render_order_status_compact(pd, title="Order Status")
|
| 990 |
+
except Exception as e:
|
| 991 |
+
st.error("Could not display the table. Please try again or contact support.")
|
| 992 |
+
log.error(f"Error creating DataFrame: {e}") # Log the specific error for debugging
|
| 993 |
else:
|
| 994 |
if table_cols and table_rows:
|
| 995 |
st.markdown('<div class="table-card">', unsafe_allow_html=True)
|