webplip / home.py
huangzhii
add iframe
795ab43
raw
history blame
643 Bytes
from pathlib import Path
import streamlit as st
import streamlit.components.v1 as components
def read_markdown_file(markdown_file):
return Path(markdown_file).read_text()
def app():
intro_markdown = read_markdown_file("introduction.md")
st.markdown(intro_markdown, unsafe_allow_html=True)
st.text('An example of twitter:')
components.html('''
<blockquote class="twitter-tweet">
<a href="https://twitter.com/xxx/status/1580753362059788288"></a>
</blockquote>
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8">
</script>
''',
height=600)