Update app.py
Browse files
app.py
CHANGED
@@ -71,53 +71,61 @@ st.markdown("""
|
|
71 |
|
72 |
""")
|
73 |
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
"
|
78 |
-
|
79 |
-
|
80 |
-
"
|
81 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
},
|
83 |
-
"
|
84 |
-
"
|
85 |
-
"
|
86 |
-
"Pokémon TCG": ["Collectible", "Type advantages", "Energy management"],
|
87 |
-
"KeyForge": ["Unique deck", "No deck building", "Chain system"],
|
88 |
-
"Legend of the Five Rings": ["Living Card Game", "Honor and conflict", "Clan loyalty"],
|
89 |
},
|
90 |
-
"
|
91 |
-
"
|
92 |
-
"
|
93 |
-
"Slay the Spire": ["Roguelike deck-builder", "Card drafting", "Relic synergies"],
|
94 |
-
"Eternal Card Game": ["Digital CCG", "Cross-platform", "Drafting and events"],
|
95 |
},
|
96 |
-
"
|
97 |
-
"
|
98 |
-
"
|
99 |
-
"Monster Train": ["Roguelike", "Multi-tiered defense", "Clan synergies"],
|
100 |
-
"Legends of Runeterra": ["League of Legends universe", "Dynamic combat", "Champion leveling"],
|
101 |
},
|
102 |
-
"
|
103 |
-
"
|
104 |
-
"
|
105 |
-
"Player Engagement": ["Replayability", "Strategic depth", "Social play"],
|
106 |
},
|
107 |
-
"
|
108 |
-
"
|
109 |
-
"
|
110 |
-
"Legends of Runeterra": ["Expansive lore", "Champion backstories", "Faction conflicts"],
|
111 |
},
|
112 |
-
"
|
113 |
-
"
|
114 |
-
"
|
115 |
-
"Strategy Guides": ["Meta analysis", "Deck guides", "Tournament reports"],
|
116 |
},
|
117 |
-
"
|
118 |
-
"
|
119 |
-
"
|
120 |
-
"Esports": ["Live-streamed events", "Professional teams", "Sponsorships"],
|
121 |
},
|
122 |
}
|
123 |
|
@@ -160,7 +168,7 @@ def load_score(key):
|
|
160 |
|
161 |
|
162 |
def search_glossary(query):
|
163 |
-
for category, terms in
|
164 |
if query.lower() in (term.lower() for term in terms):
|
165 |
st.markdown(f"#### {category}")
|
166 |
st.write(f"- {query}")
|
@@ -202,7 +210,7 @@ def display_glossary(glossary, area):
|
|
202 |
|
203 |
|
204 |
# Function to display the entire glossary in a grid format with links
|
205 |
-
def display_glossary_grid(
|
206 |
search_urls = {
|
207 |
"📖": lambda k: f"https://en.wikipedia.org/wiki/{quote(k)}",
|
208 |
"🔍": lambda k: f"https://www.google.com/search?q={quote(k)}",
|
@@ -212,7 +220,7 @@ def display_glossary_grid(roleplaying_glossary):
|
|
212 |
|
213 |
}
|
214 |
|
215 |
-
for category, details in
|
216 |
st.write(f"### {category}")
|
217 |
cols = st.columns(len(details)) # Create dynamic columns based on the number of games
|
218 |
for idx, (game, terms) in enumerate(details.items()):
|
@@ -248,7 +256,7 @@ topic_emojis = {
|
|
248 |
|
249 |
# Adjusted display_buttons_with_scores function
|
250 |
def display_buttons_with_scores():
|
251 |
-
for category, games in
|
252 |
category_emoji = topic_emojis.get(category, "🔍") # Default to search icon if no match
|
253 |
st.markdown(f"## {category_emoji} {category}")
|
254 |
for game, terms in games.items():
|
@@ -263,7 +271,7 @@ def display_buttons_with_scores():
|
|
263 |
# -----------------------------------------------------------------
|
264 |
# query_body = f"Create a detailed outline for **{term}** with subpoints highlighting key aspects, using emojis for visual engagement. Include step-by-step rules and boldface important entities and ruleset elements."
|
265 |
query_body = f"Create a streamlit python app.py that produces a detailed markdown outline and CSV dataset user interface with an outline for **{term}** with subpoints highlighting key aspects, using emojis for visual engagement. Include step-by-step rules and boldface important entities and ruleset elements."
|
266 |
-
response = search_glossary(query_prefix + query_body,
|
267 |
|
268 |
|
269 |
def fetch_wikipedia_summary(keyword):
|
@@ -1080,8 +1088,8 @@ def main():
|
|
1080 |
st.markdown('No glossary lookup')
|
1081 |
|
1082 |
# Display the glossary grid
|
1083 |
-
st.title("
|
1084 |
-
display_glossary_grid(
|
1085 |
st.title("🎲🗺️ Card Game Universe")
|
1086 |
st.markdown("## Explore the vast universes of Dungeons and Dragons, Call of Cthulhu, GURPS, and more through interactive storytelling and encyclopedic knowledge.🌠")
|
1087 |
|
|
|
71 |
|
72 |
""")
|
73 |
|
74 |
+
body_map_data = {
|
75 |
+
"🧠 Central Nervous System": {
|
76 |
+
"Brain": ["Cognitive functions", "Emotion regulation", "Neural coordination"],
|
77 |
+
"Spinal Cord": ["Nerve signal transmission", "Reflex actions", "Connects brain to body"],
|
78 |
+
},
|
79 |
+
"👀 Sensory Organs": {
|
80 |
+
"Eyes": ["Vision", "Light perception", "Color differentiation"],
|
81 |
+
"Ears": ["Hearing", "Balance maintenance", "Sound localization"],
|
82 |
+
"Nose": ["Smell detection", "Olfactory signaling", "Air filtration"],
|
83 |
+
"Tongue": ["Taste perception", "Texture sensing", "Temperature feeling"],
|
84 |
+
"Skin": ["Touch sensation", "Temperature regulation", "Protection against pathogens"],
|
85 |
+
},
|
86 |
+
"🫁 Respiratory System": {
|
87 |
+
"Lungs": ["Gas exchange", "Oxygen intake", "Carbon dioxide expulsion"],
|
88 |
+
"Trachea": ["Airway protection", "Mucus secretion", "Cough reflex"],
|
89 |
+
},
|
90 |
+
"❤️ Circulatory System": {
|
91 |
+
"Heart": ["Blood pumping", "Circulatory regulation", "Oxygen and nutrients distribution"],
|
92 |
+
"Blood Vessels": ["Blood transport", "Nutrient delivery", "Waste removal"],
|
93 |
+
},
|
94 |
+
"🍽️ Digestive System": {
|
95 |
+
"Stomach": ["Food breakdown", "Enzyme secretion", "Nutrient digestion"],
|
96 |
+
"Intestines": ["Nutrient absorption", "Waste processing", "Microbiome hosting"],
|
97 |
+
},
|
98 |
+
"💪 Musculoskeletal System": {
|
99 |
+
"Bones": ["Structural support", "Protection of organs", "Mineral storage"],
|
100 |
+
"Muscles": ["Movement facilitation", "Posture maintenance", "Heat production"],
|
101 |
},
|
102 |
+
"🚽 Excretory System": {
|
103 |
+
"Kidneys": ["Waste filtration", "Water balance", "Electrolyte regulation"],
|
104 |
+
"Bladder": ["Urine storage", "Excretion control", "Toxin removal"],
|
|
|
|
|
|
|
105 |
},
|
106 |
+
"💞 Endocrine System": {
|
107 |
+
"Thyroid": ["Metabolic regulation", "Hormone secretion", "Energy management"],
|
108 |
+
"Adrenal Glands": ["Stress response", "Metabolism control", "Immune system regulation"],
|
|
|
|
|
109 |
},
|
110 |
+
"🧬 Reproductive System": {
|
111 |
+
"Male Reproductive Organs": ["Sperm production", "Sexual function", "Hormone synthesis"],
|
112 |
+
"Female Reproductive Organs": ["Egg production", "Fetus gestation", "Hormone regulation"],
|
|
|
|
|
113 |
},
|
114 |
+
"🩸 Immune System": {
|
115 |
+
"White Blood Cells": ["Pathogen defense", "Infection response", "Immunity maintenance"],
|
116 |
+
"Lymphatic System": ["Fluid balance", "Waste removal", "Antibody production"],
|
|
|
117 |
},
|
118 |
+
"🧘 Integrative Body Functions": {
|
119 |
+
"Sleep Regulation": ["Rest and recovery", "Memory consolidation", "Energy conservation"],
|
120 |
+
"Stress Management": ["Coping mechanisms", "Hormonal balance", "Emotional regulation"],
|
|
|
121 |
},
|
122 |
+
"🔬 Research and Innovations": {
|
123 |
+
"Genetic Studies": ["Disease predisposition", "Trait inheritance", "Gene therapy"],
|
124 |
+
"Biomedical Engineering": ["Medical devices", "Prosthetics design", "Healthcare technologies"],
|
|
|
125 |
},
|
126 |
+
"🎓 Education and Awareness": {
|
127 |
+
"Anatomy and Physiology": ["Body structure", "Function understanding", "Health education"],
|
128 |
+
"Public Health Initiatives": ["Disease prevention", "Health promotion", "Community wellness"],
|
|
|
129 |
},
|
130 |
}
|
131 |
|
|
|
168 |
|
169 |
|
170 |
def search_glossary(query):
|
171 |
+
for category, terms in body_map_data.items():
|
172 |
if query.lower() in (term.lower() for term in terms):
|
173 |
st.markdown(f"#### {category}")
|
174 |
st.write(f"- {query}")
|
|
|
210 |
|
211 |
|
212 |
# Function to display the entire glossary in a grid format with links
|
213 |
+
def display_glossary_grid(body_map_data):
|
214 |
search_urls = {
|
215 |
"📖": lambda k: f"https://en.wikipedia.org/wiki/{quote(k)}",
|
216 |
"🔍": lambda k: f"https://www.google.com/search?q={quote(k)}",
|
|
|
220 |
|
221 |
}
|
222 |
|
223 |
+
for category, details in body_map_data.items():
|
224 |
st.write(f"### {category}")
|
225 |
cols = st.columns(len(details)) # Create dynamic columns based on the number of games
|
226 |
for idx, (game, terms) in enumerate(details.items()):
|
|
|
256 |
|
257 |
# Adjusted display_buttons_with_scores function
|
258 |
def display_buttons_with_scores():
|
259 |
+
for category, games in body_map_data.items():
|
260 |
category_emoji = topic_emojis.get(category, "🔍") # Default to search icon if no match
|
261 |
st.markdown(f"## {category_emoji} {category}")
|
262 |
for game, terms in games.items():
|
|
|
271 |
# -----------------------------------------------------------------
|
272 |
# query_body = f"Create a detailed outline for **{term}** with subpoints highlighting key aspects, using emojis for visual engagement. Include step-by-step rules and boldface important entities and ruleset elements."
|
273 |
query_body = f"Create a streamlit python app.py that produces a detailed markdown outline and CSV dataset user interface with an outline for **{term}** with subpoints highlighting key aspects, using emojis for visual engagement. Include step-by-step rules and boldface important entities and ruleset elements."
|
274 |
+
response = search_glossary(query_prefix + query_body, body_map_data)
|
275 |
|
276 |
|
277 |
def fetch_wikipedia_summary(keyword):
|
|
|
1088 |
st.markdown('No glossary lookup')
|
1089 |
|
1090 |
# Display the glossary grid
|
1091 |
+
st.title("Body Map Glossary 🎲")
|
1092 |
+
display_glossary_grid(body_map_data)
|
1093 |
st.title("🎲🗺️ Card Game Universe")
|
1094 |
st.markdown("## Explore the vast universes of Dungeons and Dragons, Call of Cthulhu, GURPS, and more through interactive storytelling and encyclopedic knowledge.🌠")
|
1095 |
|