Spaces:
Sleeping
Sleeping
Update app.py
Browse files281 unmodified lines2822832842852862872116 unmodified lines2404240524062407240824092410281 unmodified linesreturn f"{n} bp"def select_database(hit_df, db_type):"""Return the hit rows belonging to a detection category.2116 unmodified linesst.info("No figures were generated.")else:for name, png in st.session_state.figures_png.items():st.image(png, caption=name, use_container_width=True)with tab6:st.markdown("### Download complete report")281 unmodified lines2822832842852862872882892902912922932942952962972982993003013023033042116 unmodified lines2421242224232424242524262427281 unmodified linesreturn f"{n} bp"def st_image_compat(data, caption=None):"""Display an image across Streamlit versions.st.image only gained use_container_width in Streamlit 1.39 (Sept 2024); theparameter it replaced, use_column_width, was removed in later versions. Afixed keyword crashes on whichever version does not have it, so this triesthe current name first and falls back to the older one, then to neither."""try:st.image(data, caption=caption, use_container_width=True)except TypeError:try:st.image(data, caption=caption, use_column_width=True)except TypeError:st.image(data, caption=caption)def select_database(hit_df, db_type):"""Return the hit rows belonging to a detection category.2116 unmodified linesst.info("No figures were generated.")else:for name, png in st.session_state.figures_png.items():st_image_compat(png, caption=name)with tab6:st.markdown("### Download complete report")
app.py+18-1