File size: 2,242 Bytes
5d5fdf0 6045b0a 176fb01 5d5fdf0 6045b0a 176fb01 5d5fdf0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
import streamlit as st
from graphviz import Digraph
# The function creates a directed graph with nodes representing different parts of the brain or processes involved in decision-making. The edges denote the flow of information between these nodes.
def create_amygdala_hijacking_graph():
g = Digraph('Amygdala_Hijacking', format='png')
g.attr(rankdir='LR')
g.attr('node', shape='oval', fontname='Arial', fontsize='16', fontcolor='black')
g.attr('edge', fontname='Arial', fontsize='12', fontcolor='blue')
g.node('1', 'π Sensory Input', shape='rect', style='filled', fillcolor='lightblue')
g.node('2', 'π‘ Thalamus', shape='ellipse', style='filled', fillcolor='lightgreen')
g.node('3', 'π΄ Amygdala', shape='ellipse', color='red', style='filled', fillcolor='red', fontcolor='white')
g.node('4', 'π Hippocampus', shape='ellipse', style='filled', fillcolor='lightyellow')
g.node('5', 'π‘ Prefrontal Cortex', shape='ellipse', style='filled', fillcolor='lightpink')
g.node('6', 'π¬ Response', shape='rect', style='filled', fillcolor='lightgray')
g.edge('1', '2', label='π Receives Signals')
g.edge('2', '3', label='β‘ Quick, Emotional Response')
g.edge('2', '4', label='π Sends Signals To')
g.edge('4', '5', label='π Relays Information')
g.edge('5', '3', label='π§ Rational Control (If Not Hijacked)')
g.edge('3', '6', label='π Generates Response')
return g
def main():
st.title("Amygdala Hijacking Visualization")
st.text("A simple graph model to represent amygdala hijacking in the brain.")
amygdala_hijacking_graph = create_amygdala_hijacking_graph()
st.graphviz_chart(amygdala_hijacking_graph)
if __name__ == "__main__":
main()
st.markdown("""
Explain amygdala hijacking using a graph model in streamlit python program using graphviz to represent levels or modes of thinking
Amygdala hijacking is a phenomenon where our emotional brain (amygdala) takes control over our rational brain (prefrontal cortex), leading to impulsive and irrational behavior. In this response, I'll guide you on how to create a Streamlit app with Graphviz to visualize the concept of amygdala hijacking using a graph model.
""") |