import streamlit as st from graphviz import Digraph import json import os import pandas as pd def create_amygdala_hijacking_graph(): g = Digraph('Amygdala_Hijacking', format='png') g.attr(fontname="Helvetica,Arial,sans-serif") g.attr('node', fontname="Helvetica,Arial,sans-serif") g.attr('edge', fontname="Helvetica,Arial,sans-serif") g.attr('graph', newrank='true', nodesep='0.3', ranksep='0.2', overlap='true', splines='false') g.attr('node', fixedsize='false', fontsize='24', height='1', shape='box', style='filled,setlinewidth(5)', width='2.2', penwidth='3') g.attr('edge', arrowhead='none', arrowsize='0.5', labelfontname="Ubuntu", weight='10', style='filled,setlinewidth(5)') g.node('1', '👂 Sensory Input', fillcolor='lightblue') g.node('2', '📡 Thalamus', fillcolor='palegreen') g.node('3', '🔴 Amygdala', color='red', fillcolor='red', fontcolor='white') g.node('4', '📚 Hippocampus', fillcolor='lightyellow') g.node('5', '💡 Prefrontal Cortex', fillcolor='lightpink') g.node('6', '🎬 Response', 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 display_graph(): st.title("Amygdala Hijacking Visualization") amygdala_hijacking_graph = create_amygdala_hijacking_graph() st.graphviz_chart(amygdala_hijacking_graph) def display_table(): st.title("Fun Questions Table") data = [ (1, "😂", "How many cups of coffee do you need to function like a normal human being?", "..."), (2, "🤔", "If animals could talk, which species do you think would be the most annoying?", "..."), # ... (remaining questions) ... ] st.table(pd.DataFrame(data, columns=['Question', 'Emoji', 'Title', 'Description'])) def main(): display_graph() display_table() terms = [ '👂 Sensory Input', '📡 Thalamus', '🔴 Amygdala', '📚 Hippocampus', '💡 Prefrontal Cortex', '🎬 Response' ] for term in terms: st.write(term) upvote_button = st.button(f"👍 Upvote {term}") downvote_button = st.button(f"👎 Downvote {term}") # ... (upvote and downvote handling) ... if __name__ == "__main__": main()