import streamlit as st from graphviz import Digraph # Initialize the graph graph = Digraph(comment='Architectural Model') # Add nodes to the graph graph.node('data_layer', 'Data Layer') graph.node('acr', 'Azure Container Registry') graph.node('aks', 'Azure Kubernetes\n& Docker Container Pod\nwith Scalability') graph.node('snowflake', 'Snowflake Instance') graph.node('cosmos', 'Azure Cosmos\nDatabase') graph.node('api', 'API Standard\n(using Uvicorn)') graph.node('soar', 'SOAR Component\n(on Linux Python\nSlimbuster Docker)') # Add edges to the graph graph.edge('data_layer', 'acr') graph.edge('acr', 'aks') graph.edge('aks', 'snowflake') graph.edge('aks', 'cosmos') graph.edge('aks', 'api') graph.edge('aks', 'soar') # Define the Streamlit app def app(): st.title('Architectural Model') # Draw the graph st.graphviz_chart(graph.source) # Add buttons to customize the graph if st.button('Hide Data Layer'): graph.node('data_layer', style='invisible') if st.button('Hide Snowflake Instance'): graph.node('snowflake', style='invisible') if st.button('Hide SOAR Component'): graph.node('soar', style='invisible') # Run the Streamlit app if __name__ == '__main__': app()