Spaces:
Runtime error
Runtime error
File size: 3,765 Bytes
5aad9e7 |
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 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
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?", "[Wikipedia](https://en.wikipedia.org/wiki/Coffee)"),
(2, "π€", "If animals could talk, which species do you think would be the most annoying?", "[Wikipedia](https://en.wikipedia.org/wiki/Animal_communication)"),
(3, "π€«", "What's the craziest conspiracy theory you've ever heard?", "[Wikipedia](https://en.wikipedia.org/wiki/Conspiracy_theory)"),
(4, "π€£", "What's the worst pickup line you've ever heard or used?", "[Wikipedia](https://en.wikipedia.org/wiki/Pick-up_line)"),
(5, "π", "If you were a superhero, what would your superpower be?", "[Wikipedia](https://en.wikipedia.org/wiki/Superpower_(ability))"),
(6, "π€―", "If you could time travel, what period in history would you go to and why?", "[Wikipedia](https://en.wikipedia.org/wiki/Time_travel)"),
(7, "π", "What's the weirdest thing you've ever eaten?", "[Wikipedia](https://en.wikipedia.org/wiki/List_of_delicacies)"),
(8, "π€ͺ", "What's the most embarrassing thing that's ever happened to you in public?", "[Wikipedia](https://en.wikipedia.org/wiki/Embarrassment)"),
(9, "π", "If you could be any movie villain, who would you choose and why?", "[Wikipedia](https://en.wikipedia.org/wiki/Villain)"),
(10, "π", "What's the most useless talent you have?", "[Wikipedia](https://en.wikipedia.org/wiki/Talent_(human))"),
]
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() |