Spaces:
Sleeping
Sleeping
Commit Β·
e2304c7
1
Parent(s): 3a54b84
fix: UI for details
Browse files- src/Main.py +15 -2
- src/pages/{eVoA_Indo.py β Visa_Indo.py} +0 -0
src/Main.py
CHANGED
|
@@ -51,12 +51,25 @@ def display_map(link_map: Dict[str, Any]):
|
|
| 51 |
|
| 52 |
with st.expander("View Full Extracted Data and Found Links"):
|
| 53 |
st.markdown("##### π Full Extracted Data")
|
| 54 |
-
|
| 55 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
st.markdown("##### π Links Found on This Page")
|
| 57 |
if node.child:
|
| 58 |
st.write(f"Found **{len(node.child)}** link(s):")
|
| 59 |
-
# Use a text area for a clean, scrollable list of links
|
| 60 |
links_text = "\n".join(f"- {link}" for link in node.child)
|
| 61 |
st.text_area("Links", links_text, height=150, key=f"links_{href}")
|
| 62 |
else:
|
|
|
|
| 51 |
|
| 52 |
with st.expander("View Full Extracted Data and Found Links"):
|
| 53 |
st.markdown("##### π Full Extracted Data")
|
| 54 |
+
overview_data = node.overview.model_dump()
|
| 55 |
|
| 56 |
+
display_order = ['details', 'required_docs', 'price', 'SLA']
|
| 57 |
+
|
| 58 |
+
items_to_display = []
|
| 59 |
+
for key in display_order:
|
| 60 |
+
value = overview_data.get(key)
|
| 61 |
+
if value:
|
| 62 |
+
title = key.replace('_', ' ').capitalize()
|
| 63 |
+
items_to_display.append((title, str(value)))
|
| 64 |
+
|
| 65 |
+
for i, (title, value) in enumerate(items_to_display):
|
| 66 |
+
st.markdown(f"**{title}**")
|
| 67 |
+
st.markdown(value)
|
| 68 |
+
if i < len(items_to_display) - 1:
|
| 69 |
+
st.markdown("---")
|
| 70 |
st.markdown("##### π Links Found on This Page")
|
| 71 |
if node.child:
|
| 72 |
st.write(f"Found **{len(node.child)}** link(s):")
|
|
|
|
| 73 |
links_text = "\n".join(f"- {link}" for link in node.child)
|
| 74 |
st.text_area("Links", links_text, height=150, key=f"links_{href}")
|
| 75 |
else:
|
src/pages/{eVoA_Indo.py β Visa_Indo.py}
RENAMED
|
File without changes
|