Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1265,18 +1265,14 @@ def main():
|
|
1265 |
|
1266 |
|
1267 |
|
1268 |
-
# Feedback
|
1269 |
-
# Step: Give User a Way to Upvote or Downvote
|
1270 |
GiveFeedback=False
|
1271 |
if GiveFeedback:
|
1272 |
with st.expander("Give your feedback π", expanded=False):
|
1273 |
-
|
1274 |
feedback = st.radio("Step 8: Give your feedback", ("π Upvote", "π Downvote"))
|
1275 |
if feedback == "π Upvote":
|
1276 |
st.write("You upvoted π. Thank you for your feedback!")
|
1277 |
else:
|
1278 |
st.write("You downvoted π. Thank you for your feedback!")
|
1279 |
-
|
1280 |
load_dotenv()
|
1281 |
st.write(css, unsafe_allow_html=True)
|
1282 |
st.header("Chat with documents :books:")
|
@@ -1297,10 +1293,7 @@ def main():
|
|
1297 |
filename = generate_filename(raw, 'txt')
|
1298 |
create_file(filename, raw, '', should_save)
|
1299 |
|
1300 |
-
|
1301 |
-
# Display instructions and handle query parameters
|
1302 |
-
#st.markdown("## Glossary Lookup\nEnter a term in the URL query, like `?q=Nanotechnology` or `?query=Martian Syndicate`.")
|
1303 |
-
|
1304 |
try:
|
1305 |
query_params = st.query_params
|
1306 |
#query = (query_params.get('q') or query_params.get('query') or [''])[0]
|
@@ -1312,17 +1305,12 @@ def main():
|
|
1312 |
|
1313 |
# Display the glossary grid
|
1314 |
st.markdown("### π²πΊοΈ Graphic Novel Gallery")
|
1315 |
-
display_videos_and_links()
|
1316 |
-
display_images_and_wikipedia_summaries()
|
1317 |
-
display_glossary_grid(roleplaying_glossary)
|
1318 |
-
st.markdown("## Explore the vast universe of Graphic Novels including card and board games with fascinating readable content and semantic rules where language is fun!.π ")
|
1319 |
-
display_buttons_with_scores()
|
1320 |
-
|
1321 |
-
# Assuming the transhuman_glossary and other setup code remains the same
|
1322 |
-
#st.write("Current Query Parameters:", st.query_params)
|
1323 |
-
#st.markdown("### Query Parameters - These Deep Link Map to Remixable Methods, Navigate or Trigger Functionalities")
|
1324 |
|
1325 |
-
#
|
|
|
|
|
|
|
|
|
1326 |
if 'action' in st.query_params:
|
1327 |
action = st.query_params()['action'][0] # Get the first (or only) 'action' parameter
|
1328 |
if action == 'show_message':
|
|
|
1265 |
|
1266 |
|
1267 |
|
|
|
|
|
1268 |
GiveFeedback=False
|
1269 |
if GiveFeedback:
|
1270 |
with st.expander("Give your feedback π", expanded=False):
|
|
|
1271 |
feedback = st.radio("Step 8: Give your feedback", ("π Upvote", "π Downvote"))
|
1272 |
if feedback == "π Upvote":
|
1273 |
st.write("You upvoted π. Thank you for your feedback!")
|
1274 |
else:
|
1275 |
st.write("You downvoted π. Thank you for your feedback!")
|
|
|
1276 |
load_dotenv()
|
1277 |
st.write(css, unsafe_allow_html=True)
|
1278 |
st.header("Chat with documents :books:")
|
|
|
1293 |
filename = generate_filename(raw, 'txt')
|
1294 |
create_file(filename, raw, '', should_save)
|
1295 |
|
1296 |
+
|
|
|
|
|
|
|
1297 |
try:
|
1298 |
query_params = st.query_params
|
1299 |
#query = (query_params.get('q') or query_params.get('query') or [''])[0]
|
|
|
1305 |
|
1306 |
# Display the glossary grid
|
1307 |
st.markdown("### π²πΊοΈ Graphic Novel Gallery")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1308 |
|
1309 |
+
display_videos_and_links() # Video Jump Grid
|
1310 |
+
display_images_and_wikipedia_summaries() # Image Jump Grid
|
1311 |
+
display_glossary_grid(roleplaying_glossary) # Word Glossary Jump Grid
|
1312 |
+
display_buttons_with_scores() # Feedback Jump Grid
|
1313 |
+
|
1314 |
if 'action' in st.query_params:
|
1315 |
action = st.query_params()['action'][0] # Get the first (or only) 'action' parameter
|
1316 |
if action == 'show_message':
|