Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,6 +76,29 @@ def display_glossary(area):
|
|
| 76 |
for idx, term in enumerate(terms, start=1):
|
| 77 |
st.write(f"{idx}. {term}")
|
| 78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 79 |
# Streamlined UI for displaying buttons with scores, integrating emojis
|
| 80 |
def display_buttons_with_scores():
|
| 81 |
for header, terms in transhuman_glossary.items():
|
|
|
|
| 76 |
for idx, term in enumerate(terms, start=1):
|
| 77 |
st.write(f"{idx}. {term}")
|
| 78 |
|
| 79 |
+
|
| 80 |
+
# Function to display glossary in a 3x3 grid
|
| 81 |
+
def display_glossary_grid(glossary):
|
| 82 |
+
# Group related categories for a 3x3 grid
|
| 83 |
+
groupings = [
|
| 84 |
+
["π Core Technologies", "π Nations", "π‘ Memes"],
|
| 85 |
+
["π Institutions", "π Organizations", "βοΈ War"],
|
| 86 |
+
["π Military", "π¦Ή Outlaws", "π½ Terrorists"],
|
| 87 |
+
]
|
| 88 |
+
|
| 89 |
+
for group in groupings:
|
| 90 |
+
cols = st.columns(3) # Create three columns
|
| 91 |
+
for idx, category in enumerate(group):
|
| 92 |
+
with cols[idx]:
|
| 93 |
+
st.markdown(f"### {category}")
|
| 94 |
+
terms = glossary[category]
|
| 95 |
+
for term in terms:
|
| 96 |
+
st.write(f"- {term}")
|
| 97 |
+
|
| 98 |
+
# Display the glossary grid
|
| 99 |
+
st.title("Transhuman Space Glossary π")
|
| 100 |
+
display_glossary_grid(transhuman_glossary)
|
| 101 |
+
|
| 102 |
# Streamlined UI for displaying buttons with scores, integrating emojis
|
| 103 |
def display_buttons_with_scores():
|
| 104 |
for header, terms in transhuman_glossary.items():
|