lfoppiano commited on
Commit
f8386bf
1 Parent(s): 96f0be6

trying to scroll down

Browse files
Files changed (1) hide show
  1. streamlit_app.py +23 -2
streamlit_app.py CHANGED
@@ -67,6 +67,16 @@ st.set_page_config(
67
  }
68
  )
69
 
 
 
 
 
 
 
 
 
 
 
70
 
71
  def new_file():
72
  st.session_state['loaded_embeddings'] = None
@@ -283,7 +293,8 @@ if uploaded_file and not st.session_state.loaded_embeddings:
283
  tmp_file.write(bytearray(binary))
284
  st.session_state['binary'] = binary
285
 
286
- st.session_state['doc_id'] = hash = st.session_state['rqa'][model].create_memory_embeddings(tmp_file.name, perc_overlap=0.1)
 
287
  st.session_state['loaded_embeddings'] = True
288
  st.session_state.messages = []
289
 
@@ -302,8 +313,18 @@ with right_column:
302
  }
303
  </style>
304
  '''
305
-
306
  st.markdown(css, unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
307
  if st.session_state.loaded_embeddings and question and len(question) > 0 and st.session_state.doc_id:
308
  for message in st.session_state.messages:
309
  with st.chat_message(message["role"]):
 
67
  }
68
  )
69
 
70
+ css = '''
71
+ <style>
72
+ [data-testid="ScrollToBottomContainer"] {
73
+ overflow: hidden;
74
+ }
75
+ </style>
76
+ '''
77
+
78
+ st.markdown(css, unsafe_allow_html=True)
79
+
80
 
81
  def new_file():
82
  st.session_state['loaded_embeddings'] = None
 
293
  tmp_file.write(bytearray(binary))
294
  st.session_state['binary'] = binary
295
 
296
+ st.session_state['doc_id'] = hash = st.session_state['rqa'][model].create_memory_embeddings(tmp_file.name,
297
+ perc_overlap=0.1)
298
  st.session_state['loaded_embeddings'] = True
299
  st.session_state.messages = []
300
 
 
313
  }
314
  </style>
315
  '''
 
316
  st.markdown(css, unsafe_allow_html=True)
317
+
318
+ # st.markdown(
319
+ # """
320
+ # <script>
321
+ # document.querySelectorAll('[data-testid="column"]').scrollIntoView({behavior: "smooth"});
322
+ # </script>
323
+ # """,
324
+ # unsafe_allow_html=True,
325
+ # )
326
+
327
+
328
  if st.session_state.loaded_embeddings and question and len(question) > 0 and st.session_state.doc_id:
329
  for message in st.session_state.messages:
330
  with st.chat_message(message["role"]):