awacke1 commited on
Commit
2106373
1 Parent(s): 9c4fe81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -18
app.py CHANGED
@@ -129,23 +129,11 @@ roleplaying_glossary = {
129
  }
130
 
131
 
132
- # Function to search within the roleplaying glossary and display results
133
- def search_glossary(query, roleplaying_glossary):
134
- found = False
135
- for category, details in roleplaying_glossary.items():
136
- for game, terms in details.items():
137
- if query.lower() in ' '.join(terms).lower():
138
- if not found:
139
- st.markdown(f"#### Results for '{query}'")
140
- found = True
141
- st.markdown(f"**{category} -> {game}:**")
142
- for term in terms:
143
- if query.lower() in term.lower():
144
- st.write(f"- {term}")
145
-
146
- if not found:
147
- st.write("No results found.")
148
-
149
 
150
  st.write('## ' + query)
151
 
@@ -171,7 +159,6 @@ def search_glossary(query, roleplaying_glossary):
171
 
172
  SpeechSynthesis(all)
173
  return all
174
-
175
 
176
  # Function to display the glossary in a structured format
177
  def display_glossary(glossary, area):
 
129
  }
130
 
131
 
132
+ def search_glossary(query):
133
+ for category, terms in transhuman_glossary.items():
134
+ if query.lower() in (term.lower() for term in terms):
135
+ st.markdown(f"#### {category}")
136
+ st.write(f"- {query}")
 
 
 
 
 
 
 
 
 
 
 
 
137
 
138
  st.write('## ' + query)
139
 
 
159
 
160
  SpeechSynthesis(all)
161
  return all
 
162
 
163
  # Function to display the glossary in a structured format
164
  def display_glossary(glossary, area):