|
121 | 121 | graph_attr={'rankdir': 'TB', 'splines': 'ortho', 'nodesep': '1.0', 'bgcolor': 'transparent', 'fontcolor': 'white'}) |
122 | 122 |
|
123 | 123 | # Define UI & API nodes at the top |
124 | | -graph.node('UI', 'Streamlit Frontend\nInteractive Dashboard (IST)', fillcolor='#AED9E0', fontcolor='#0e1117', color='#AED9E0', penwidth='2') |
125 | | -graph.node('API', 'FastAPI Backend\nInternal Routing (UTC)', fillcolor='#A8E6CF', fontcolor='#0e1117', color='#A8E6CF', penwidth='2') |
126 | | -graph.node('HUB', 'HF Hub Dataset\nCentralized History Store', shape='folder', fillcolor='#FFF9C4', fontcolor='#0e1117', color='#FFF9C4', penwidth='2') |
127 | | -graph.node('DB', 'SQLite DB\nLocal Instance Cache', shape='cylinder', fillcolor='#DCCBEC', fontcolor='#0e1117', color='#DCCBEC', penwidth='2') |
| 124 | +graph.node('UI', 'Streamlit Frontend\nInteractive Dashboard (IST)', fillcolor='#1c1f26', fontcolor='#FFFFFF', color='#FF4B4B', penwidth='2.5') |
| 125 | +graph.node('API', 'FastAPI Backend\nInternal Routing (UTC)', fillcolor='#1c1f26', fontcolor='#FFFFFF', color='#00D1FF', penwidth='2.5') |
| 126 | +graph.node('HUB', 'HF Hub Dataset\nCentralized History Store', shape='folder', fillcolor='#1c1f26', fontcolor='#FFFFFF', color='#FFD700', penwidth='2.5') |
| 127 | +graph.node('DB', 'SQLite DB\nLocal Instance Cache', shape='cylinder', fillcolor='#1c1f26', fontcolor='#FFFFFF', color='#BF5AF2', penwidth='2.5') |
128 | 128 |
|
129 | 129 | # Core connections |
130 | | -graph.edge('UI', 'API', label=' internal localhost:8000', color='#555555', fontcolor='#aaaaaa') |
131 | | -graph.edge('API', 'DB', label=' Read/Write', color='#555555', fontcolor='#aaaaaa') |
132 | | -graph.edge('API', 'HUB', label=' HfApi Sync (Persistent)', color='#555555', fontcolor='#aaaaaa') |
| 130 | +graph.edge('UI', 'API', label=' internal localhost:8000', color='#475569', fontcolor='#94A3B8') |
| 131 | +graph.edge('API', 'DB', label=' Read/Write', color='#475569', fontcolor='#94A3B8') |
| 132 | +graph.edge('API', 'HUB', label=' HfApi Sync (Persistent)', color='#475569', fontcolor='#94A3B8') |
133 | 133 |
|
134 | 134 | # Machine Learning Subgraph |
135 | 135 | with graph.subgraph(name='cluster_ml') as ml: |
136 | | - ml.attr(label='Machine Learning & Inference Pipeline', style='dashed', color='#333333', fontcolor='#888888') |
137 | | - ml.node('ENS', 'Ensemble Engine\nSoft-Voting Aggregator', shape='diamond', fillcolor='#FFDAB9', fontcolor='#0e1117', color='#FFDAB9', penwidth='2') |
138 | | - ml.node('MODELS', 'Classifiers\n(RF, SVM, LogReg, NN, KNN)', fillcolor='#FFDAB9', fontcolor='#0e1117', color='#FFDAB9', penwidth='2') |
139 | | - ml.node('SHAP', 'SHAP Explainer\nFeature Impact Analysis', fillcolor='#FFDAB9', fontcolor='#0e1117', color='#FFDAB9', penwidth='2') |
| 136 | + ml.attr(label='Machine Learning & Inference Pipeline', style='dashed', color='#334155', fontcolor='#94A3B8') |
| 137 | + ml.node('ENS', 'Ensemble Engine\nSoft-Voting Aggregator', shape='diamond', fillcolor='#1c1f26', fontcolor='#FFFFFF', color='#FF9F0A', penwidth='2.5') |
| 138 | + ml.node('MODELS', 'Classifiers\n(RF, SVM, LogReg, NN, KNN)', fillcolor='#1c1f26', fontcolor='#FFFFFF', color='#FF9F0A', penwidth='2.5') |
| 139 | + ml.node('SHAP', 'SHAP Explainer\nFeature Impact Analysis', fillcolor='#1c1f26', fontcolor='#FFFFFF', color='#FF9F0A', penwidth='2.5') |
140 | 140 |
|
141 | 141 | # Hardware Export Subgraph |
142 | 142 | with graph.subgraph(name='cluster_edge') as edge: |
143 | | - edge.attr(label='Hardware & Edge AI Export', style='dashed', color='#333333', fontcolor='#888888') |
144 | | - edge.node('TRANS', 'C-Code Transpiler\nINT8 Quantization', fillcolor='#FFD1DC', fontcolor='#0e1117', color='#FFD1DC', penwidth='2') |
145 | | - edge.node('HEADER', 'tinyml_model.h\nOptimized Header File', shape='note', fillcolor='#FFD1DC', fontcolor='#0e1117', color='#FFD1DC', penwidth='2') |
146 | | - edge.node('MCU', 'ESP32 / ARM Cortex-M\nMicrocontroller Node', fillcolor='#FFD1DC', fontcolor='#0e1117', color='#FFD1DC', penwidth='2') |
| 143 | + edge.attr(label='Hardware & Edge AI Export', style='dashed', color='#334155', fontcolor='#94A3B8') |
| 144 | + edge.node('TRANS', 'C-Code Transpiler\nINT8 Quantization', fillcolor='#1c1f26', fontcolor='#FFFFFF', color='#32D74B', penwidth='2.5') |
| 145 | + edge.node('HEADER', 'tinyml_model.h\nOptimized Header File', shape='note', fillcolor='#1c1f26', fontcolor='#FFFFFF', color='#32D74B', penwidth='2.5') |
| 146 | + edge.node('MCU', 'ESP32 / ARM Cortex-M\nMicrocontroller Node', fillcolor='#1c1f26', fontcolor='#FFFFFF', color='#32D74B', penwidth='2.5') |
147 | 147 |
|
148 | 148 | # Map Cross-cluster edges |
149 | | -graph.edge('API', 'ENS', label=' Predict', color='#cccccc', fontcolor='#cccccc') |
150 | | -graph.edge('ENS', 'MODELS', color='#cccccc') |
| 149 | +graph.edge('API', 'ENS', label=' Predict', color='#CBD5E1', fontcolor='#CBD5E1') |
| 150 | +graph.edge('ENS', 'MODELS', color='#CBD5E1') |
151 | 151 |
|
152 | | -graph.edge('API', 'SHAP', label=' Explain', color='#cccccc', fontcolor='#cccccc') |
153 | | -graph.edge('SHAP', 'MODELS', style='dashed', label=' Analyzes Trees', fontcolor='#888888', color='#888888') |
| 152 | +graph.edge('API', 'SHAP', label=' Explain', color='#CBD5E1', fontcolor='#CBD5E1') |
| 153 | +graph.edge('SHAP', 'MODELS', style='dashed', label=' Analyzes Trees', fontcolor='#64748B', color='#64748B') |
154 | 154 |
|
155 | | -graph.edge('API', 'TRANS', label=' Export Config', color='#cccccc', fontcolor='#cccccc') |
156 | | -graph.edge('TRANS', 'HEADER', label=' Scale FP32 to INT8', fontcolor='#888888', color='#888888') |
157 | | -graph.edge('HEADER', 'MCU', label=' Flash Firmware', color='#cccccc') |
| 155 | +graph.edge('API', 'TRANS', label=' Export Config', color='#CBD5E1', fontcolor='#CBD5E1') |
| 156 | +graph.edge('TRANS', 'HEADER', label=' Scale FP32 to INT8', fontcolor='#64748B', color='#64748B') |
| 157 | +graph.edge('HEADER', 'MCU', label=' Flash Firmware', color='#CBD5E1') |
158 | 158 |
|
159 | 159 | st.graphviz_chart(graph, use_container_width=True) |
160 | 160 |
|
| 161 | + |
161 | 162 | st.markdown("---") |
162 | 163 | st.markdown("### ✨ Core Capabilities") |
163 | 164 |
|
|
0 commit comments