awacke1 commited on
Commit
62fb097
โ€ข
1 Parent(s): 7648282

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -3
app.py CHANGED
@@ -57,28 +57,38 @@ roleplaying_glossary = {
57
  "Call of Cthulhu": ["Keeper's Rulebook", "Investigator Handbook", "Monster Manual"],
58
  "GURPS": ["Basic Set: Characters", "Basic Set: Campaigns", "GURPS Lite"],
59
  "Pathfinder": ["Core Rulebook", "Bestiary", "GameMastery Guide"],
 
 
60
  },
61
  "๐Ÿ—บ๏ธ Maps & Settings": {
62
  "Dungeons and Dragons": ["The Forgotten Realms", "Eberron", "Ravenloft"],
63
  "Gamma World": ["Gamma Terra", "The Wastelands"],
64
  "Car Wars": ["Autoduel America", "The Arenas"],
65
  "Top Secret": ["World of Espionage", "Mission Modules"],
 
 
66
  },
67
  "๐Ÿ› ๏ธ Game Mechanics & Tools": {
68
  "GURPS": ["GURPS Character Sheet", "GURPS Calculator", "Modular System for Custom Campaigns"],
69
  "Pathfinder": ["Pathfinder Character Sheet", "Pathfinder Spell Database", "Adventure Path Modules"],
70
  "Call of Cthulhu": ["Sanity System", "Investigator's Companion", "Mythos Tomes"],
 
 
71
  },
72
  "๐ŸงŸ Monsters & Adversaries": {
73
  "Dungeons and Dragons": ["Beholder", "Dragon", "Lich"],
74
  "Call of Cthulhu": ["Great Old Ones", "Deep Ones", "Shoggoth"],
75
  "Pathfinder": ["Goblins", "Dragons", "Vampires"],
 
 
76
  },
77
  "๐Ÿ“œ Campaigns & Adventures": {
78
  "Dungeons and Dragons": ["Curse of Strahd", "Tomb of Annihilation", "Waterdeep: Dragon Heist"],
79
  "Gamma World": ["Legion of Gold", "Famine in Far-Go"],
80
  "Call of Cthulhu": ["The Masks of Nyarlathotep", "The Haunting"],
81
  "GURPS": ["Banestorm", "Infinite Worlds"],
 
 
82
  },
83
  "๐ŸŽจ Creatives & Assets": {
84
  "General RPG": ["Character Artwork", "Map Generators", "Token Creators"],
@@ -93,6 +103,8 @@ roleplaying_glossary = {
93
  "Dungeons and Dragons": ["The Pantheon of Deities", "Historic Timelines", "Cultural Customs"],
94
  "Pathfinder": ["Golarion", "Inner Sea Gods", "The Starstone"],
95
  "Call of Cthulhu": ["The Cthulhu Mythos", "Historic Campaign Settings", "Cosmic Horrors"],
 
 
96
  },
97
  "๐ŸŽ–๏ธ Character Development": {
98
  "Skill Systems": ["Class-Based", "Skill-Based", "Level-Less Progression"],
@@ -104,8 +116,19 @@ roleplaying_glossary = {
104
  "Homebrew Campaigns": ["World Building Guides", "Custom Adventures", "NPC Galleries"],
105
  "Creative Tools": ["Homebrewery", "D&D Beyond Homebrew", "GMBinder"],
106
  },
 
 
 
 
 
 
 
 
 
 
107
  }
108
 
 
109
  # Function to search within the roleplaying glossary and display results
110
  def search_glossary(query, roleplaying_glossary):
111
  found = False
@@ -134,9 +157,13 @@ def search_glossary(query, roleplaying_glossary):
134
 
135
  if st.checkbox('Llama'):
136
  st.write('Reasoning with your inputs using Llama...')
 
137
  response = StreamLLMChatResponse(query)
138
  filename_txt = generate_filename(query, "md")
139
- create_file(filename_txt, query, query + ' --- ' + response, should_save)
 
 
 
140
  # ------------------------------------------------------------------------------------------------
141
 
142
 
@@ -186,8 +213,10 @@ def display_buttons_with_scores():
186
  # If button is pressed, update score and possibly rerun the search or action
187
  update_score(key)
188
  # Adjust the search_glossary call as needed to match the function's signature
189
- search_glossary('Create a three-level markdown outline with 3 subpoints each where each line defines and writes out the descriptions with appropriate emojis for the glossary term: ' + term, roleplaying_glossary)
190
- st.experimental_rerun()
 
 
191
 
192
 
193
  def fetch_wikipedia_summary(keyword):
 
57
  "Call of Cthulhu": ["Keeper's Rulebook", "Investigator Handbook", "Monster Manual"],
58
  "GURPS": ["Basic Set: Characters", "Basic Set: Campaigns", "GURPS Lite"],
59
  "Pathfinder": ["Core Rulebook", "Bestiary", "GameMastery Guide"],
60
+ "Kindred of the East": ["Core Rulebook", "Companion Guide", "Kindred Secrets"],
61
+ "Changeling": ["The Dreaming Core", "Players Guide", "Storytellers Handbook"],
62
  },
63
  "๐Ÿ—บ๏ธ Maps & Settings": {
64
  "Dungeons and Dragons": ["The Forgotten Realms", "Eberron", "Ravenloft"],
65
  "Gamma World": ["Gamma Terra", "The Wastelands"],
66
  "Car Wars": ["Autoduel America", "The Arenas"],
67
  "Top Secret": ["World of Espionage", "Mission Modules"],
68
+ "Kindred of the East": ["The Eastern Realms", "Cities of Darkness", "Ancestral Voices"],
69
+ "Changeling": ["Freeholds & Hidden Glens", "Isles of the Mighty", "Kingdoms of Will"],
70
  },
71
  "๐Ÿ› ๏ธ Game Mechanics & Tools": {
72
  "GURPS": ["GURPS Character Sheet", "GURPS Calculator", "Modular System for Custom Campaigns"],
73
  "Pathfinder": ["Pathfinder Character Sheet", "Pathfinder Spell Database", "Adventure Path Modules"],
74
  "Call of Cthulhu": ["Sanity System", "Investigator's Companion", "Mythos Tomes"],
75
+ "Kindred of the East": ["Karmic Wheel", "Yin-Yang Balance", "Chi Cultivation"],
76
+ "Changeling": ["Glamour Harnessing", "Arts and Realms", "Cantrip Casting"],
77
  },
78
  "๐ŸงŸ Monsters & Adversaries": {
79
  "Dungeons and Dragons": ["Beholder", "Dragon", "Lich"],
80
  "Call of Cthulhu": ["Great Old Ones", "Deep Ones", "Shoggoth"],
81
  "Pathfinder": ["Goblins", "Dragons", "Vampires"],
82
+ "Kindred of the East": ["Kuei-jin Ancestors", "Demon Hordes", "Yama Kings"],
83
+ "Changeling": ["Thallain Nightmares", "Autumn People", "Banality's Minions"],
84
  },
85
  "๐Ÿ“œ Campaigns & Adventures": {
86
  "Dungeons and Dragons": ["Curse of Strahd", "Tomb of Annihilation", "Waterdeep: Dragon Heist"],
87
  "Gamma World": ["Legion of Gold", "Famine in Far-Go"],
88
  "Call of Cthulhu": ["The Masks of Nyarlathotep", "The Haunting"],
89
  "GURPS": ["Banestorm", "Infinite Worlds"],
90
+ "Kindred of the East": ["Blood and Silk", "Dharma Book: Bone Flowers"],
91
+ "Changeling": ["Dreams and Nightmares", "War in Concordia"],
92
  },
93
  "๐ŸŽจ Creatives & Assets": {
94
  "General RPG": ["Character Artwork", "Map Generators", "Token Creators"],
 
103
  "Dungeons and Dragons": ["The Pantheon of Deities", "Historic Timelines", "Cultural Customs"],
104
  "Pathfinder": ["Golarion", "Inner Sea Gods", "The Starstone"],
105
  "Call of Cthulhu": ["The Cthulhu Mythos", "Historic Campaign Settings", "Cosmic Horrors"],
106
+ "Kindred of the East": ["Eastern Mythology", "The Five Courts", "Undead Politics"],
107
+ "Changeling": ["Faerie Lore", "The Dreaming", "Changeling Society"],
108
  },
109
  "๐ŸŽ–๏ธ Character Development": {
110
  "Skill Systems": ["Class-Based", "Skill-Based", "Level-Less Progression"],
 
116
  "Homebrew Campaigns": ["World Building Guides", "Custom Adventures", "NPC Galleries"],
117
  "Creative Tools": ["Homebrewery", "D&D Beyond Homebrew", "GMBinder"],
118
  },
119
+ "๐ŸŒ General Topics": {
120
+ "Fantasy Cultures": ["High Elven Traditions", "Dwarven Kingdoms", "Nomadic Tribes"],
121
+ "World Cultures": ["Ancient Egypt Mysteries", "Feudal Japan Lore", "Viking Raiders"],
122
+ "Magic": ["Arcane Arts", "Divine Blessings", "Ritual Craft"],
123
+ "Fantasy Races": ["Elves and Dwarves", "Orcs and Goblins", "Fae and Spirits"],
124
+ "Creatures of Myth and Legend": ["Dragons and Wyverns", "Ghosts and Ghouls", "Titans and Giants"],
125
+ "Dress and Costume": ["Medieval Attire", "Warrior's Armor", "Ceremonial Robes"],
126
+ "Arms, Armor, and Armies": ["Sword and Shield", "Siege Warfare", "Cavalry Tactics"],
127
+ "Anatomy of a Castle": ["Keep and Bailey", "Castle Defenses", "Living Quarters"],
128
+ },
129
  }
130
 
131
+
132
  # Function to search within the roleplaying glossary and display results
133
  def search_glossary(query, roleplaying_glossary):
134
  found = False
 
157
 
158
  if st.checkbox('Llama'):
159
  st.write('Reasoning with your inputs using Llama...')
160
+ response2 = StreamLLMChatResponse(query)
161
  response = StreamLLMChatResponse(query)
162
  filename_txt = generate_filename(query, "md")
163
+ create_file(filename_txt, query, query + ' --- ' + response2, should_save)
164
+ return '# Query: ' + query + '# Response: ' + response + '# Response2: ' + response2
165
+
166
+ return '# Query: ' + query + '# Response: ' + response
167
  # ------------------------------------------------------------------------------------------------
168
 
169
 
 
213
  # If button is pressed, update score and possibly rerun the search or action
214
  update_score(key)
215
  # Adjust the search_glossary call as needed to match the function's signature
216
+ response = search_glossary('Create a three-level markdown outline with 3 subpoints each where each line defines and writes out the descriptions with appropriate emojis for the glossary term: ' + term, roleplaying_glossary)
217
+ #st.experimental_rerun()
218
+
219
+
220
 
221
 
222
  def fetch_wikipedia_summary(keyword):