File size: 1,777 Bytes
6fea598
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
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.node('1', 'Sensory Input', shape='oval')
    g.node('2', 'Thalamus', shape='oval')
    g.node('3', 'Amygdala', shape='oval', color='red', style='filled')
    g.node('4', 'Hippocampus', shape='oval')
    g.node('5', 'Prefrontal Cortex', shape='oval')
    g.node('6', 'Response', shape='oval')

    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.
""")