Spaces:
Runtime error
Runtime error
Create backup.app.py
Browse files- backup.app.py +77 -0
backup.app.py
ADDED
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from graphviz import Digraph
|
3 |
+
import json
|
4 |
+
import os
|
5 |
+
import pandas as pd
|
6 |
+
|
7 |
+
def create_amygdala_hijacking_graph():
|
8 |
+
g = Digraph('Amygdala_Hijacking', format='png')
|
9 |
+
g.attr(fontname="Helvetica,Arial,sans-serif")
|
10 |
+
g.attr('node', fontname="Helvetica,Arial,sans-serif")
|
11 |
+
g.attr('edge', fontname="Helvetica,Arial,sans-serif")
|
12 |
+
g.attr('graph', newrank='true', nodesep='0.3', ranksep='0.2', overlap='true', splines='false')
|
13 |
+
g.attr('node', fixedsize='false', fontsize='24', height='1', shape='box', style='filled,setlinewidth(5)', width='2.2', penwidth='3')
|
14 |
+
g.attr('edge', arrowhead='none', arrowsize='0.5', labelfontname="Ubuntu", weight='10', style='filled,setlinewidth(5)')
|
15 |
+
|
16 |
+
g.node('1', 'π Sensory Input', fillcolor='lightblue')
|
17 |
+
g.node('2', 'π‘ Thalamus', fillcolor='palegreen')
|
18 |
+
g.node('3', 'π΄ Amygdala', color='red', fillcolor='red', fontcolor='white')
|
19 |
+
g.node('4', 'π Hippocampus', fillcolor='lightyellow')
|
20 |
+
g.node('5', 'π‘ Prefrontal Cortex', fillcolor='lightpink')
|
21 |
+
g.node('6', 'π¬ Response', fillcolor='lightgray')
|
22 |
+
|
23 |
+
g.edge('1', '2', label='π Receives Signals')
|
24 |
+
g.edge('2', '3', label='β‘ Quick, Emotional Response')
|
25 |
+
g.edge('2', '4', label='π Sends Signals To')
|
26 |
+
g.edge('4', '5', label='π Relays Information')
|
27 |
+
g.edge('5', '3', label='π§ Rational Control (If Not Hijacked)')
|
28 |
+
g.edge('3', '6', label='π Generates Response')
|
29 |
+
|
30 |
+
return g
|
31 |
+
|
32 |
+
def display_graph():
|
33 |
+
st.title("Amygdala Hijacking Visualization")
|
34 |
+
amygdala_hijacking_graph = create_amygdala_hijacking_graph()
|
35 |
+
st.graphviz_chart(amygdala_hijacking_graph)
|
36 |
+
|
37 |
+
def display_table():
|
38 |
+
st.title("Fun Questions Table")
|
39 |
+
|
40 |
+
data = [
|
41 |
+
(1, "π", "How many cups of coffee do you need to function like a normal human being?", "[Wikipedia](https://en.wikipedia.org/wiki/Coffee)"),
|
42 |
+
(2, "π€", "If animals could talk, which species do you think would be the most annoying?", "[Wikipedia](https://en.wikipedia.org/wiki/Animal_communication)"),
|
43 |
+
(3, "π€«", "What's the craziest conspiracy theory you've ever heard?", "[Wikipedia](https://en.wikipedia.org/wiki/Conspiracy_theory)"),
|
44 |
+
(4, "π€£", "What's the worst pickup line you've ever heard or used?", "[Wikipedia](https://en.wikipedia.org/wiki/Pick-up_line)"),
|
45 |
+
(5, "π", "If you were a superhero, what would your superpower be?", "[Wikipedia](https://en.wikipedia.org/wiki/Superpower_(ability))"),
|
46 |
+
(6, "π€―", "If you could time travel, what period in history would you go to and why?", "[Wikipedia](https://en.wikipedia.org/wiki/Time_travel)"),
|
47 |
+
(7, "π", "What's the weirdest thing you've ever eaten?", "[Wikipedia](https://en.wikipedia.org/wiki/List_of_delicacies)"),
|
48 |
+
(8, "π€ͺ", "What's the most embarrassing thing that's ever happened to you in public?", "[Wikipedia](https://en.wikipedia.org/wiki/Embarrassment)"),
|
49 |
+
(9, "π", "If you could be any movie villain, who would you choose and why?", "[Wikipedia](https://en.wikipedia.org/wiki/Villain)"),
|
50 |
+
(10, "π", "What's the most useless talent you have?", "[Wikipedia](https://en.wikipedia.org/wiki/Talent_(human))"),
|
51 |
+
]
|
52 |
+
|
53 |
+
st.table(pd.DataFrame(data, columns=['Question', 'Emoji', 'Title', 'Description']))
|
54 |
+
|
55 |
+
|
56 |
+
def main():
|
57 |
+
display_graph()
|
58 |
+
display_table()
|
59 |
+
|
60 |
+
terms = [
|
61 |
+
'π Sensory Input',
|
62 |
+
'π‘ Thalamus',
|
63 |
+
'π΄ Amygdala',
|
64 |
+
'π Hippocampus',
|
65 |
+
'π‘ Prefrontal Cortex',
|
66 |
+
'π¬ Response'
|
67 |
+
]
|
68 |
+
|
69 |
+
for term in terms:
|
70 |
+
st.write(term)
|
71 |
+
upvote_button = st.button(f"π Upvote {term}")
|
72 |
+
downvote_button = st.button(f"π Downvote {term}")
|
73 |
+
|
74 |
+
# ... (upvote and downvote handling) ...
|
75 |
+
|
76 |
+
if __name__ == "__main__":
|
77 |
+
main()
|