When I open the expander, it expands all the way down and then scrolls back up to the top—a sort of scrolling bug. Does anyone know how I can fix it? This occurs sometimes
if used_sources:
for src in used_sources:
with st.expander(f"{src[‘link’]} ({src[‘score’]:.2f})"):
display_clean_context(src[“context”])
st.json(src[“source_metadata”])
else:
st.info(“No source was considered to be used to answer this model.”)
st.markdown("**Relevant Sources (with score)**")
if relevant_sources:
for src in relevant_sources:
with st.expander(f"{src['link']} **({src['score']:.2f})**"):
display_clean_context(src["context"])
st.json(src["source_metadata"])
else:
st.info("No relevante source was considered to be used to answer this model.")