awacke1 commited on
Commit
2955dfa
1 Parent(s): 084c3cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -25
app.py CHANGED
@@ -159,30 +159,6 @@ def display_glossary_grid(roleplaying_glossary):
159
 
160
 
161
 
162
- def display_buttons_with_scores_old():
163
- # Assuming generate_key, load_score, update_score, and search_glossary are defined elsewhere
164
- for category, games in roleplaying_glossary.items():
165
- st.markdown(f"## {category}")
166
- for game, terms in games.items():
167
- for term in terms:
168
- # Construct a unique key for each term. This replaces the previous use of .index()
169
- # The key now includes both the category and the game for uniqueness
170
- key = f"{category}_{game}_{term}".replace(' ', '_').lower()
171
- score = load_score(key) # Load the score based on the generated key
172
-
173
- # Display a button for each term with its score
174
- if st.button(f"{term} {score}🚀", key=key):
175
- # If button is pressed, update score and possibly rerun the search or action
176
- update_score(key)
177
- # Adjust the search_glossary call as needed to match the function's signature
178
- # -------------------------- Call LLMs with the button content:
179
-
180
- 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)
181
-
182
-
183
- #st.experimental_rerun()
184
-
185
-
186
  game_emojis = {
187
  "Dungeons and Dragons": "🐉",
188
  "Call of Cthulhu": "🐙",
@@ -220,7 +196,9 @@ def display_buttons_with_scores():
220
  update_score(key)
221
  # Create a dynamic query incorporating emojis and formatting for clarity
222
  query_prefix = f"{category_emoji} {game_emoji} **{game} - {category}:**"
223
- 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."
 
 
224
  response = search_glossary(query_prefix + query_body, roleplaying_glossary)
225
 
226
 
 
159
 
160
 
161
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  game_emojis = {
163
  "Dungeons and Dragons": "🐉",
164
  "Call of Cthulhu": "🐙",
 
196
  update_score(key)
197
  # Create a dynamic query incorporating emojis and formatting for clarity
198
  query_prefix = f"{category_emoji} {game_emoji} **{game} - {category}:**"
199
+ # ----------------------------------------------------------------------------------------------
200
+ #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."
201
+ 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."
202
  response = search_glossary(query_prefix + query_body, roleplaying_glossary)
203
 
204