Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -93,22 +93,11 @@ roleplaying_glossary = {
|
|
93 |
}
|
94 |
|
95 |
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
if query.lower() in ' '.join(terms).lower():
|
102 |
-
if not found:
|
103 |
-
st.markdown(f"#### Results for '{query}'")
|
104 |
-
found = True
|
105 |
-
st.markdown(f"**{category} -> {game}:**")
|
106 |
-
for term in terms:
|
107 |
-
if query.lower() in term.lower():
|
108 |
-
st.write(f"- {term}")
|
109 |
-
|
110 |
-
if not found:
|
111 |
-
st.write("No results found.")
|
112 |
|
113 |
st.write('## ' + query)
|
114 |
|
@@ -134,7 +123,7 @@ def search_glossary(query, roleplaying_glossary):
|
|
134 |
|
135 |
SpeechSynthesis(all)
|
136 |
return all
|
137 |
-
|
138 |
|
139 |
# Function to display the glossary in a structured format
|
140 |
def display_glossary(glossary, area):
|
|
|
93 |
}
|
94 |
|
95 |
|
96 |
+
def search_glossary(query):
|
97 |
+
for category, terms in roleplaying_glossary.items():
|
98 |
+
if query.lower() in (term.lower() for term in terms):
|
99 |
+
st.markdown(f"#### {category}")
|
100 |
+
st.write(f"- {query}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
st.write('## ' + query)
|
103 |
|
|
|
123 |
|
124 |
SpeechSynthesis(all)
|
125 |
return all
|
126 |
+
|
127 |
|
128 |
# Function to display the glossary in a structured format
|
129 |
def display_glossary(glossary, area):
|