Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1272,16 +1272,15 @@ def main():
|
|
1272 |
create_file(filename, raw, '', should_save)
|
1273 |
|
1274 |
# Relocated! Hope you like your new space - enjoy!
|
1275 |
-
# Display instructions and handle query parameters
|
1276 |
st.markdown("## Glossary Lookup\nEnter a term in the URL query, like `?q=Nanotechnology` or `?query=Martian Syndicate`.")
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
|
1286 |
# Display the glossary grid
|
1287 |
st.title("Roleplaying Games Glossary 🎲")
|
|
|
1272 |
create_file(filename, raw, '', should_save)
|
1273 |
|
1274 |
# Relocated! Hope you like your new space - enjoy!
|
|
|
1275 |
st.markdown("## Glossary Lookup\nEnter a term in the URL query, like `?q=Nanotechnology` or `?query=Martian Syndicate`.")
|
1276 |
+
try:
|
1277 |
+
query_params = st.query_params
|
1278 |
+
query = (query_params.get('q') or query_params.get('query') or [''])
|
1279 |
+
st.markdown('# Running query: ' + query)
|
1280 |
+
if query: search_glossary(query)
|
1281 |
+
except:
|
1282 |
+
st.markdown('No glossary lookup')
|
1283 |
+
|
1284 |
|
1285 |
# Display the glossary grid
|
1286 |
st.title("Roleplaying Games Glossary 🎲")
|