Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1122,10 +1122,13 @@ def main():
|
|
| 1122 |
# Relocated! Hope you like your new space - enjoy!
|
| 1123 |
# Display instructions and handle query parameters
|
| 1124 |
st.markdown("## Glossary Lookup\nEnter a term in the URL query, like `?q=Nanotechnology` or `?query=Martian Syndicate`.")
|
| 1125 |
-
|
| 1126 |
-
|
| 1127 |
-
|
| 1128 |
-
|
|
|
|
|
|
|
|
|
|
| 1129 |
# Display the glossary grid
|
| 1130 |
st.title("Transhuman Space Glossary 🌌")
|
| 1131 |
display_glossary_grid(transhuman_glossary)
|
|
@@ -1138,8 +1141,8 @@ def main():
|
|
| 1138 |
display_images_and_wikipedia_summaries()
|
| 1139 |
|
| 1140 |
# Assuming the transhuman_glossary and other setup code remains the same
|
| 1141 |
-
st.write("Current Query Parameters:", st.query_params)
|
| 1142 |
-
st.markdown("### Query Parameters - These Deep Link Map to Remixable Methods, Navigate or Trigger Functionalities")
|
| 1143 |
|
| 1144 |
# Example: Using query parameters to navigate or trigger functionalities
|
| 1145 |
if 'action' in st.query_params:
|
|
|
|
| 1122 |
# Relocated! Hope you like your new space - enjoy!
|
| 1123 |
# Display instructions and handle query parameters
|
| 1124 |
st.markdown("## Glossary Lookup\nEnter a term in the URL query, like `?q=Nanotechnology` or `?query=Martian Syndicate`.")
|
| 1125 |
+
try:
|
| 1126 |
+
query_params = st.query_params
|
| 1127 |
+
query = (query_params.get('q') or query_params.get('query') or [''])[0]
|
| 1128 |
+
if query: search_glossary(query)
|
| 1129 |
+
except:
|
| 1130 |
+
st.markdown('No glossary lookup')
|
| 1131 |
+
|
| 1132 |
# Display the glossary grid
|
| 1133 |
st.title("Transhuman Space Glossary 🌌")
|
| 1134 |
display_glossary_grid(transhuman_glossary)
|
|
|
|
| 1141 |
display_images_and_wikipedia_summaries()
|
| 1142 |
|
| 1143 |
# Assuming the transhuman_glossary and other setup code remains the same
|
| 1144 |
+
#st.write("Current Query Parameters:", st.query_params)
|
| 1145 |
+
#st.markdown("### Query Parameters - These Deep Link Map to Remixable Methods, Navigate or Trigger Functionalities")
|
| 1146 |
|
| 1147 |
# Example: Using query parameters to navigate or trigger functionalities
|
| 1148 |
if 'action' in st.query_params:
|