Update app.py
Browse filesapp.py updated as per Gmail layout with dummy emails.
app.py
CHANGED
|
@@ -184,13 +184,19 @@ col1, col2, col3 = st.columns([2, 3, 2])
|
|
| 184 |
|
| 185 |
with col1:
|
| 186 |
st.markdown("#### 📩 Inbox")
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
|
| 195 |
with col2:
|
| 196 |
st.markdown("#### ✉️ Email Details")
|
|
|
|
| 184 |
|
| 185 |
with col1:
|
| 186 |
st.markdown("#### 📩 Inbox")
|
| 187 |
+
if not inbox_df.empty:
|
| 188 |
+
# Ensure first email is selected by default
|
| 189 |
+
selected_email = st.radio(
|
| 190 |
+
"Choose an email to view:",
|
| 191 |
+
range(len(inbox_df)),
|
| 192 |
+
format_func=lambda i: inbox_df.iloc[i]["Subject"],
|
| 193 |
+
label_visibility="collapsed",
|
| 194 |
+
index=0 # default to first email
|
| 195 |
+
)
|
| 196 |
+
else:
|
| 197 |
+
st.info("No emails available in the inbox.")
|
| 198 |
+
selected_email = None
|
| 199 |
+
|
| 200 |
|
| 201 |
with col2:
|
| 202 |
st.markdown("#### ✉️ Email Details")
|