streamlit-markdown / src /streamlit_app.py
kozo2's picture
Upload src/streamlit_app.py with huggingface_hub
e832896 verified
raw
history blame contribute delete
584 Bytes
import streamlit as st
# Set the page title
st.set_page_config(page_title="Markdown Renderer", page_icon="๐Ÿ“")
# Add a title to the app
st.title("Markdown Renderer")
# Create a text area for markdown input
markdown_input = st.text_area(
"Enter your Markdown text here:",
height=300,
placeholder="# Hello World\n\nThis is **bold** and this is *italic*.\n\n- Item 1\n- Item 2\n- Item 3"
)
# Add a divider
st.divider()
# Render the markdown
if markdown_input:
st.markdown(markdown_input)
else:
st.info("Enter some Markdown text above to see it rendered here.")