awacke1 commited on
Commit
7efa938
โ€ข
1 Parent(s): a353039

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -27
app.py CHANGED
@@ -165,32 +165,6 @@ def display_glossary_grid(roleplaying_glossary):
165
  st.markdown(f"{term} {links_md}", unsafe_allow_html=True)
166
 
167
 
168
-
169
-
170
- def display_buttons_with_scores_old():
171
- # Assuming generate_key, load_score, update_score, and search_glossary are defined elsewhere
172
- for category, games in roleplaying_glossary.items():
173
- st.markdown(f"## {category}")
174
- for game, terms in games.items():
175
- for term in terms:
176
- # Construct a unique key for each term. This replaces the previous use of .index()
177
- # The key now includes both the category and the game for uniqueness
178
- key = f"{category}_{game}_{term}".replace(' ', '_').lower()
179
- score = load_score(key) # Load the score based on the generated key
180
-
181
- # Display a button for each term with its score
182
- if st.button(f"{term} {score}๐Ÿš€", key=key):
183
- # If button is pressed, update score and possibly rerun the search or action
184
- update_score(key)
185
- # Adjust the search_glossary call as needed to match the function's signature
186
- # -------------------------- Call LLMs with the button content:
187
-
188
- 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)
189
-
190
-
191
- #st.experimental_rerun()
192
-
193
-
194
  game_emojis = {
195
  "Dungeons and Dragons": "๐Ÿ‰",
196
  "Call of Cthulhu": "๐Ÿ™",
@@ -228,7 +202,9 @@ def display_buttons_with_scores():
228
  update_score(key)
229
  # Create a dynamic query incorporating emojis and formatting for clarity
230
  query_prefix = f"{category_emoji} {game_emoji} **{game} - {category}:**"
231
- 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."
 
 
232
  response = search_glossary(query_prefix + query_body, roleplaying_glossary)
233
 
234
 
 
165
  st.markdown(f"{term} {links_md}", unsafe_allow_html=True)
166
 
167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  game_emojis = {
169
  "Dungeons and Dragons": "๐Ÿ‰",
170
  "Call of Cthulhu": "๐Ÿ™",
 
202
  update_score(key)
203
  # Create a dynamic query incorporating emojis and formatting for clarity
204
  query_prefix = f"{category_emoji} {game_emoji} **{game} - {category}:**"
205
+ # -----------------------------------------------------------------
206
+ # 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."
207
+ 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."
208
  response = search_glossary(query_prefix + query_body, roleplaying_glossary)
209
 
210