Import markdown file

Hey. I want to import a .md file in the streamlit application.

In tried this approach:

from pathlib import Path
import streamlit as st

def read_markdown_file(markdown_file):
    return Path(markdown_file).read_text()

intro_markdown = read_markdown_file("")
st.markdown(intro_markdown, unsafe_allow_html=True)

I get the error that the file cannot be found even though it is in the same folder as the
Any ideas?

Hi @Isa,

I was unable to reproduce the error on my end. It successfully read and displayed the markdown file :confused:

Have you tried to pass the absolute path to the file instead of a relative path? e.g:


Best, :balloon: