Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import streamlit.components.v1 as components
|
| 3 |
-
import urllib.parse
|
| 4 |
|
| 5 |
# --------------------------
|
| 6 |
# Mermaid Renderer Function
|
|
@@ -30,54 +29,36 @@ def render_mermaid(mermaid_code, height=300):
|
|
| 30 |
"""
|
| 31 |
components.html(html_code, height=height)
|
| 32 |
|
| 33 |
-
# --------------------------
|
| 34 |
-
# Function to Add Clickable Links to Mermaid Diagrams
|
| 35 |
-
# --------------------------
|
| 36 |
-
def add_mermaid_links(mermaid_code, area_code, base_url):
|
| 37 |
-
"""Add clickable links to Mermaid diagram nodes."""
|
| 38 |
-
lines = mermaid_code.split('\n')
|
| 39 |
-
new_lines = []
|
| 40 |
-
for line in lines:
|
| 41 |
-
new_lines.append(line)
|
| 42 |
-
# Check if the line defines a node (e.g., LeCo["..."])
|
| 43 |
-
if '[' in line and ']' in line and not line.strip().startswith('click'):
|
| 44 |
-
node_id = line.split('[')[0].strip()
|
| 45 |
-
if node_id:
|
| 46 |
-
# Self-referential link with query parameter
|
| 47 |
-
safe_url = f"/?area={area_code}#{node_id}"
|
| 48 |
-
new_lines.append(f' click {node_id} "{safe_url}" "View {node_id}"')
|
| 49 |
-
return '\n'.join(new_lines)
|
| 50 |
-
|
| 51 |
# --------------------------
|
| 52 |
# Markdown Outlines for Each Area
|
| 53 |
# --------------------------
|
| 54 |
markdown_areas = {
|
| 55 |
"1. 👥 Leadership Management Collaboration LeCo": r'''
|
| 56 |
-
|
| 57 |
''',
|
| 58 |
"2. 🔒 Security Compliance Reliability SeCo": r'''
|
| 59 |
-
|
| 60 |
''',
|
| 61 |
"3. 📊 Data Engineering Analytics Data Governance DaEn": r'''
|
| 62 |
-
|
| 63 |
''',
|
| 64 |
"4. 📢 Community OpenSource Communication CoOS": r'''
|
| 65 |
-
|
| 66 |
''',
|
| 67 |
"5. 📱 FullStack UI Mobile Product Development FuMo": r'''
|
| 68 |
-
|
| 69 |
''',
|
| 70 |
"6. 💻 Software Cloud MLOps Infrastructure SCMI": r'''
|
| 71 |
-
|
| 72 |
''',
|
| 73 |
"7. 🤖 Machine Learning AI Model Development MLAI": r'''
|
| 74 |
-
|
| 75 |
''',
|
| 76 |
"8. 🔧 Systems Infrastructure LowLevel Engineering SyIn": r'''
|
| 77 |
-
|
| 78 |
''',
|
| 79 |
"9. 🎯 Specialized Domains Emerging Technologies SpDo": r'''
|
| 80 |
-
|
| 81 |
'''
|
| 82 |
}
|
| 83 |
|
|
@@ -153,26 +134,21 @@ graph LR
|
|
| 153 |
'''
|
| 154 |
}
|
| 155 |
|
| 156 |
-
# Update mermaid_areas with clickable links
|
| 157 |
-
base_url = "http://localhost:8501" # Replace with your app's base URL when deployed (e.g., Streamlit Cloud URL)
|
| 158 |
-
for key in mermaid_areas:
|
| 159 |
-
area_code = key.split(' ')[-1] # Extract area code (e.g., LeCo)
|
| 160 |
-
mermaid_areas[key] = add_mermaid_links(mermaid_areas[key], area_code, base_url)
|
| 161 |
-
|
| 162 |
# --------------------------
|
| 163 |
# Markdown Sections
|
| 164 |
# --------------------------
|
|
|
|
| 165 |
md_combined_outline = r'''
|
| 166 |
# 📚 Hands On ML App. Dev. with Mixture of Experts and Multiagent Skills and State of Art ML Architecture
|
| 167 |
-
1.
|
| 168 |
-
2.
|
| 169 |
-
3.
|
| 170 |
-
4.
|
| 171 |
-
5.
|
| 172 |
-
6.
|
| 173 |
-
7.
|
| 174 |
-
8.
|
| 175 |
-
9.
|
| 176 |
'''
|
| 177 |
|
| 178 |
md_submodels_outline = r'''
|
|
@@ -341,16 +317,6 @@ graph TD
|
|
| 341 |
CoOS ---|🤝 collaborates with| LeCo
|
| 342 |
CoOS ---|🗣️ informs| DaEn
|
| 343 |
SpDo ---|🔄 shares with| CoOS
|
| 344 |
-
|
| 345 |
-
click LeCo "/?area=LeCo" "View Leadership and Collaboration"
|
| 346 |
-
click SeCo "/?area=SeCo" "View Security and Compliance"
|
| 347 |
-
click DaEn "/?area=DaEn" "View Data Engineering"
|
| 348 |
-
click CoOS "/?area=CoOS" "View Community Open Source"
|
| 349 |
-
click FuMo "/?area=FuMo" "View FullStack UI Mobile"
|
| 350 |
-
click SoCM "/?area=SoCM" "View Software Cloud MLOps"
|
| 351 |
-
click AIML "/?area=AIML" "View AI Machine Learning"
|
| 352 |
-
click SyIn "/?area=SyIn" "View Systems Infrastructure"
|
| 353 |
-
click SpDo "/?area=SpDo" "View Specialized Domains"
|
| 354 |
'''
|
| 355 |
|
| 356 |
# --------------------------
|
|
@@ -359,37 +325,17 @@ graph TD
|
|
| 359 |
def main():
|
| 360 |
st.set_page_config(page_title="Densified Skill Tree", layout="wide")
|
| 361 |
|
| 362 |
-
#
|
| 363 |
-
area_params = st.query_params.get_all("area") # Handle repeated keys
|
| 364 |
-
selected_area = area_params[0] if area_params else None # Take the first area or None
|
| 365 |
-
|
| 366 |
-
# Display combined outline with clickable links
|
| 367 |
st.markdown(md_combined_outline, unsafe_allow_html=True)
|
|
|
|
| 368 |
|
| 369 |
-
#
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
if area_code == selected_area:
|
| 375 |
-
st.markdown(markdown_areas[key], unsafe_allow_html=True)
|
| 376 |
-
if key in mermaid_areas:
|
| 377 |
-
render_mermaid(mermaid_areas[key], height=350)
|
| 378 |
-
# Add a "Back to Overview" button
|
| 379 |
-
if st.button("Back to Overview"):
|
| 380 |
-
st.query_params.clear() # Clear query parameters to show all areas
|
| 381 |
-
found = True
|
| 382 |
-
break
|
| 383 |
-
if not found:
|
| 384 |
-
st.warning(f"Invalid area: {selected_area}")
|
| 385 |
-
else:
|
| 386 |
-
# Show all areas if no specific area is selected
|
| 387 |
-
for key in sorted(markdown_areas.keys(), key=lambda k: int(k.split('.')[0])):
|
| 388 |
-
st.markdown(markdown_areas[key], unsafe_allow_html=True)
|
| 389 |
-
if key in mermaid_areas:
|
| 390 |
-
render_mermaid(mermaid_areas[key], height=350)
|
| 391 |
|
| 392 |
-
# Render the combined mermaid diagram
|
| 393 |
render_mermaid(combined_mermaid, height=850)
|
| 394 |
|
| 395 |
# Display additional markdown sections
|
|
@@ -400,4 +346,4 @@ def main():
|
|
| 400 |
st.markdown(md_tweet, unsafe_allow_html=True)
|
| 401 |
|
| 402 |
if __name__ == "__main__":
|
| 403 |
-
main()
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import streamlit.components.v1 as components
|
|
|
|
| 3 |
|
| 4 |
# --------------------------
|
| 5 |
# Mermaid Renderer Function
|
|
|
|
| 29 |
"""
|
| 30 |
components.html(html_code, height=height)
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
# --------------------------
|
| 33 |
# Markdown Outlines for Each Area
|
| 34 |
# --------------------------
|
| 35 |
markdown_areas = {
|
| 36 |
"1. 👥 Leadership Management Collaboration LeCo": r'''
|
| 37 |
+
1. 👥 Leadership Management Collaboration LeCo
|
| 38 |
''',
|
| 39 |
"2. 🔒 Security Compliance Reliability SeCo": r'''
|
| 40 |
+
2. 🔒 Security Compliance Reliability SeCo
|
| 41 |
''',
|
| 42 |
"3. 📊 Data Engineering Analytics Data Governance DaEn": r'''
|
| 43 |
+
3. 📊 Data Engineering Analytics Data Governance DaEn
|
| 44 |
''',
|
| 45 |
"4. 📢 Community OpenSource Communication CoOS": r'''
|
| 46 |
+
4. 📢 Community OpenSource Communication CoOS
|
| 47 |
''',
|
| 48 |
"5. 📱 FullStack UI Mobile Product Development FuMo": r'''
|
| 49 |
+
5. 📱 FullStack UI Mobile Product Development FuMo
|
| 50 |
''',
|
| 51 |
"6. 💻 Software Cloud MLOps Infrastructure SCMI": r'''
|
| 52 |
+
6. 💻 Software Cloud MLOps Infrastructure SCMI
|
| 53 |
''',
|
| 54 |
"7. 🤖 Machine Learning AI Model Development MLAI": r'''
|
| 55 |
+
7. 🤖 Machine Learning AI Model Development MLAI
|
| 56 |
''',
|
| 57 |
"8. 🔧 Systems Infrastructure LowLevel Engineering SyIn": r'''
|
| 58 |
+
8. 🔧 Systems Infrastructure LowLevel Engineering SyIn
|
| 59 |
''',
|
| 60 |
"9. 🎯 Specialized Domains Emerging Technologies SpDo": r'''
|
| 61 |
+
9. 🎯 Specialized Domains Emerging Technologies SpDo
|
| 62 |
'''
|
| 63 |
}
|
| 64 |
|
|
|
|
| 134 |
'''
|
| 135 |
}
|
| 136 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
# --------------------------
|
| 138 |
# Markdown Sections
|
| 139 |
# --------------------------
|
| 140 |
+
|
| 141 |
md_combined_outline = r'''
|
| 142 |
# 📚 Hands On ML App. Dev. with Mixture of Experts and Multiagent Skills and State of Art ML Architecture
|
| 143 |
+
1. 🗼LeCo👥 Leadership and Collaboration : Strategic leadership and team management.
|
| 144 |
+
2. 👓SeCo🔒 Security and Compliance : Security operations, compliance, and system hardening.
|
| 145 |
+
3. 🪑DaEn📊 Data Engineering : Data processing, analytics, and governance.
|
| 146 |
+
4. 🪟CoOS📢 Community OpenSource : Community engagement, documentation, and collaboration.
|
| 147 |
+
5. ✋FuMo📱 FullStack UI Mobile : Mobile and web app development with ML integration.
|
| 148 |
+
6. 🎲SoCM💻 Software Cloud MLOps : Cloud infrastructure, ML frameworks, and automation.
|
| 149 |
+
7. ☁️AIML🤖 AI Machine Learning : Large–scale architectures, distributed training, and inference.
|
| 150 |
+
8. 🚪SyIn🔧 Systems Infrastructure : Hardware, OS, and distributed HPC deployments.
|
| 151 |
+
9. 🐱SpDo🎯 Specialized Domains : Advanced CV, robotics, HPC, and AI quantization.
|
| 152 |
'''
|
| 153 |
|
| 154 |
md_submodels_outline = r'''
|
|
|
|
| 317 |
CoOS ---|🤝 collaborates with| LeCo
|
| 318 |
CoOS ---|🗣️ informs| DaEn
|
| 319 |
SpDo ---|🔄 shares with| CoOS
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 320 |
'''
|
| 321 |
|
| 322 |
# --------------------------
|
|
|
|
| 325 |
def main():
|
| 326 |
st.set_page_config(page_title="Densified Skill Tree", layout="wide")
|
| 327 |
|
| 328 |
+
# Optionally render combined outlines and submodels if desired:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 329 |
st.markdown(md_combined_outline, unsafe_allow_html=True)
|
| 330 |
+
#st.markdown(md_submodels_outline, unsafe_allow_html=True)
|
| 331 |
|
| 332 |
+
# For each numbered area, display its markdown outline first, then its mermaid diagram.
|
| 333 |
+
for key in sorted(markdown_areas.keys(), key=lambda k: int(k.split('.')[0])):
|
| 334 |
+
st.markdown(markdown_areas[key], unsafe_allow_html=True)
|
| 335 |
+
if key in mermaid_areas:
|
| 336 |
+
render_mermaid(mermaid_areas[key], height=350)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 337 |
|
| 338 |
+
# Render the combined mermaid diagram for an overview
|
| 339 |
render_mermaid(combined_mermaid, height=850)
|
| 340 |
|
| 341 |
# Display additional markdown sections
|
|
|
|
| 346 |
st.markdown(md_tweet, unsafe_allow_html=True)
|
| 347 |
|
| 348 |
if __name__ == "__main__":
|
| 349 |
+
main()
|