awacke1 commited on
Commit
c84c8be
โ€ข
1 Parent(s): cbf5682

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
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():