Danila_lipatov

Streamlit_gif

Mar 22nd, 2023
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. file_ = open("smith", "rb")
  2. contents = file_.read()
  3. data_url = base64.b64encode(contents).decode("utf-8")
  4. file_.close()
  5. st.markdown("This <b>HTML tag</b> is not escaped!", unsafe_allow_html=True)
  6. st.markdown(
  7. f'<img src="data:image/gif;base64,{data_url}" alt="flag gif" style="float:right;width:200px;height:200px;margin-right:-50px;margin-top:-100px">',
  8. unsafe_allow_html=True,
  9. )
Add Comment
Please, Sign In to add comment