lfoppiano commited on
Commit
c125b19
1 Parent(s): d5cc518

add scrollable column

Browse files
Files changed (1) hide show
  1. streamlit_app.py +11 -3
streamlit_app.py CHANGED
@@ -283,9 +283,7 @@ 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,
287
- chunk_size=chunk_size,
288
- perc_overlap=0.1)
289
  st.session_state['loaded_embeddings'] = True
290
  st.session_state.messages = []
291
 
@@ -296,6 +294,16 @@ with left_column:
296
  left_column.markdown(get_pdf_display(st.session_state['binary']), unsafe_allow_html=True)
297
 
298
  with right_column:
 
 
 
 
 
 
 
 
 
 
299
  if st.session_state.loaded_embeddings and question and len(question) > 0 and st.session_state.doc_id:
300
  for message in st.session_state.messages:
301
  with st.chat_message(message["role"]):
 
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
 
 
294
  left_column.markdown(get_pdf_display(st.session_state['binary']), unsafe_allow_html=True)
295
 
296
  with right_column:
297
+ css = '''
298
+ <style>
299
+ [data-testid="column"] {
300
+ overflow: auto;
301
+ height: 70vh;
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"]):