Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -101,24 +101,12 @@ roleplaying_glossary = {
|
|
| 101 |
}
|
| 102 |
|
| 103 |
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
if query.lower() in ' '.join(terms).lower():
|
| 110 |
-
if not found:
|
| 111 |
-
st.markdown(f"#### Results for '{query}'")
|
| 112 |
-
found = True
|
| 113 |
-
st.markdown(f"**{category} -> {game}:**")
|
| 114 |
-
for term in terms:
|
| 115 |
-
if query.lower() in term.lower():
|
| 116 |
-
st.write(f"- {term}")
|
| 117 |
-
|
| 118 |
-
if not found:
|
| 119 |
-
st.write("No results found.")
|
| 120 |
|
| 121 |
-
|
| 122 |
st.write('## ' + query)
|
| 123 |
|
| 124 |
all=""
|
|
@@ -143,7 +131,7 @@ def search_glossary(query, roleplaying_glossary):
|
|
| 143 |
|
| 144 |
SpeechSynthesis(all)
|
| 145 |
return all
|
| 146 |
-
|
| 147 |
|
| 148 |
# Function to display the glossary in a structured format
|
| 149 |
def display_glossary(glossary, area):
|
|
|
|
| 101 |
}
|
| 102 |
|
| 103 |
|
| 104 |
+
def search_glossary(query):
|
| 105 |
+
for category, terms in roleplaying_glossary.items():
|
| 106 |
+
if query.lower() in (term.lower() for term in terms):
|
| 107 |
+
st.markdown(f"#### {category}")
|
| 108 |
+
st.write(f"- {query}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
|
|
|
|
| 110 |
st.write('## ' + query)
|
| 111 |
|
| 112 |
all=""
|
|
|
|
| 131 |
|
| 132 |
SpeechSynthesis(all)
|
| 133 |
return all
|
| 134 |
+
|
| 135 |
|
| 136 |
# Function to display the glossary in a structured format
|
| 137 |
def display_glossary(glossary, area):
|