Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -51,25 +51,25 @@ def load_score(key):
|
|
51 |
return score_data["score"]
|
52 |
return 0
|
53 |
|
54 |
-
|
|
|
55 |
transhuman_glossary = {
|
56 |
-
"🚀 Core Technologies": ["
|
57 |
-
"🌐 Nations": ["
|
58 |
-
"💡 Memes": ["
|
59 |
-
"🏛 Institutions": ["
|
60 |
-
"🔗 Organizations": ["
|
61 |
-
"⚔️ War": ["
|
62 |
-
"🎖 Military": ["
|
63 |
-
"🦹 Outlaws": ["
|
64 |
-
"👽 Terrorists": ["
|
65 |
}
|
66 |
|
67 |
-
|
68 |
-
# Function to search glossary and display results
|
69 |
def search_glossary(query):
|
70 |
for category, terms in transhuman_glossary.items():
|
71 |
if query.lower() in (term.lower() for term in terms):
|
72 |
-
st.markdown(f"
|
73 |
st.write(f"- {query}")
|
74 |
|
75 |
st.write('## Processing query against GPT and Llama:')
|
@@ -86,8 +86,7 @@ def search_glossary(query):
|
|
86 |
filename_txt = generate_filename(query, "md")
|
87 |
create_file(filename_txt, query, response, should_save)
|
88 |
# ------------------------------------------------------------------------------------------------
|
89 |
-
|
90 |
-
|
91 |
# Display the glossary with Streamlit components, ensuring emojis are used
|
92 |
def display_glossary(area):
|
93 |
st.subheader(f"📘 Glossary for {area}")
|
@@ -95,8 +94,6 @@ def display_glossary(area):
|
|
95 |
for idx, term in enumerate(terms, start=1):
|
96 |
st.write(f"{idx}. {term}")
|
97 |
|
98 |
-
|
99 |
-
|
100 |
def display_glossary_grid(glossary):
|
101 |
# Search URL functions with emoji as keys, now using quote for URL safety
|
102 |
search_urls = {
|
@@ -124,6 +121,9 @@ def display_glossary_grid(glossary):
|
|
124 |
links_md = ' '.join([f"[{emoji}]({url(term)})" for emoji, url in search_urls.items()])
|
125 |
st.markdown(f"{term} {links_md}", unsafe_allow_html=True)
|
126 |
|
|
|
|
|
|
|
127 |
|
128 |
# Streamlined UI for displaying buttons with scores, integrating emojis
|
129 |
def display_buttons_with_scores():
|
|
|
51 |
return score_data["score"]
|
52 |
return 0
|
53 |
|
54 |
+
|
55 |
+
# Enhanced Transhuman Space glossary with futuristic content
|
56 |
transhuman_glossary = {
|
57 |
+
"🚀 Core Technologies": ["Gene Editing🧬 (CRISPR)", "Neural Interface Technology🧠⚡", "Advanced Robotics🤖🛠", "Sustainable Energy Systems🌱⚡", "Augmented Reality (AR)🕶️", "3D Bioprinting🖨️🧬", "Nano Medicine🔬💊", "Blockchain for Security🔗🔒", "Synthetic Biology🧪🌿", "Autonomous Vehicles🚗💨"],
|
58 |
+
"🌐 Nations": ["United Earth Government🌍", "Off-Earth Mining Corporations🌌⛏️", "Underwater Habitat States🌊🏠", "Orbital Colony Federations🛰️🤝", "High-altitude Aerostat Communities☁️🏠", "Virtual Nations🌐👾", "AI Sovereignties🤖👑", "Genetically Modified Enclaves🧬🏞️", "Space Elevator Consortiums🚀⚙️", "Quantum Computing Havens💻🔐"],
|
59 |
+
"💡 Memes": ["Trans-speciesism🧬🐅➡️🚀", "Eco-technologism🌍🔧", "Mind Uploading💾🧠", "Multi-planetary Living🪐🏠", "Robot Rights Activism🤖❤️", "Virtual Reality Societies🕶️🌐", "Quantum Consciousness🔮🧠", "Solar System Restorationism🌞🌱", "Post-Scarcity Economics💰➡️🔄", "Cyber-physical Integration🖥️🦾"],
|
60 |
+
"🏛 Institutions": ["Global AI Ethics Board🤖📜", "Interplanetary Health Organization🪐💉", "Deep Space Exploration Agency🌌🚀", "Human Augmentation Regulatory Commission🦾📏", "Environmental Reclamation Bureau🌍💚", "Quantum Computing Oversight🔬💻", "Synthetic Ecosystems Management🌿🧬", "Universal Basic Income Council💰🌍", "Cybersecurity Task Force🔒🌐", "Exobiology Research Institute👽🔬"],
|
61 |
+
"🔗 Organizations": ["Quantum Encryption Innovators💻🔒", "Space Habitat Architects🛰️🏗️", "Neurotechnology Pioneers🧠🔌", "Renewable Energy Coalitions⚡🌞", "Augmented Reality Developers🕶️💡", "Personalized Medicine Labs🧬💊", "AI for Good Collectives🤖❤️", "Nanotech Environmentalists🔬🌱", "Human Enhancement Advocates🦾🌟", "Interstellar Communication Networkers📡✨"],
|
62 |
+
"⚔️ War": ["Anti-Drone Warfare Systems🚁⚔️", "Electromagnetic Pulse (EMP) Defense🌩️🔒", "Genetic Warfare Defense🧬🛡️", "Quantum Hacking Countermeasures💻🛡️", "Space Debris Clearing Operations🚀🧹", "Cybernetic Combat Units🦾⚔️", "Orbital Weapon Platforms🛰️💥", "Artificially Intelligent Strategy Engines🤖🗺️", "Stealth Nanobots🔬🔇", "Climate Control Warfare🌍🌪️"],
|
63 |
+
"🎖 Military": ["Space Marine Corps🚀🎖️", "Planetary Defense Networks🌍🔗", "Quantum Communication Squads💻📡", "High-altitude UAV Fleets☁️🚁", "Exosuit Assault Teams🦾🚶♂️", "Autonomous Combat Drones🤖🛸", "Deep Space Reconnaissance Units🌌🔭", "Cyber Warfare Divisions💻🔒", "Genetic Modification Troops🧬👥", "Orbital Drop Shock Troopers🛰️🪂"],
|
64 |
+
"🦹 Outlaws": ["Quantum Hackers💻🎭", "Gene Piracy Rings🧬💰", "AI Syndicates🤖🚫", "Space Smugglers🚀💼", "Underground Augmentation Labs🔬🦾", "Virtual Heist Crews🕶️💾", "Nanotech Smugglers🔬🚚", "Anti-AI Militias🤖❌", "Orbital Hijackers🛰️🔫", "Climate Hackers🌍💻"],
|
65 |
+
"👽 Terrorists": ["Synthetic Virus Creators🧬🦠", "EMP Terrorists🌩️💣", "Dark Web Cults💻🕯️", "Nanotech Extremists🔬🧨", "Anti-Humanity Sects🚫🚶♂️", "Quantum Data Destroyers💻🧨", "Terraforming Saboteurs🌍🔧", "Mind Control Radicals🧠📡", "Space Station Seizers🛰️🚨", "Transdimensional Threats🌀👽"],
|
66 |
}
|
67 |
|
68 |
+
# Updated function to search glossary and display results with enhanced content
|
|
|
69 |
def search_glossary(query):
|
70 |
for category, terms in transhuman_glossary.items():
|
71 |
if query.lower() in (term.lower() for term in terms):
|
72 |
+
st.markdown(f"#### {category}")
|
73 |
st.write(f"- {query}")
|
74 |
|
75 |
st.write('## Processing query against GPT and Llama:')
|
|
|
86 |
filename_txt = generate_filename(query, "md")
|
87 |
create_file(filename_txt, query, response, should_save)
|
88 |
# ------------------------------------------------------------------------------------------------
|
89 |
+
|
|
|
90 |
# Display the glossary with Streamlit components, ensuring emojis are used
|
91 |
def display_glossary(area):
|
92 |
st.subheader(f"📘 Glossary for {area}")
|
|
|
94 |
for idx, term in enumerate(terms, start=1):
|
95 |
st.write(f"{idx}. {term}")
|
96 |
|
|
|
|
|
97 |
def display_glossary_grid(glossary):
|
98 |
# Search URL functions with emoji as keys, now using quote for URL safety
|
99 |
search_urls = {
|
|
|
121 |
links_md = ' '.join([f"[{emoji}]({url(term)})" for emoji, url in search_urls.items()])
|
122 |
st.markdown(f"{term} {links_md}", unsafe_allow_html=True)
|
123 |
|
124 |
+
|
125 |
+
|
126 |
+
|
127 |
|
128 |
# Streamlined UI for displaying buttons with scores, integrating emojis
|
129 |
def display_buttons_with_scores():
|