![]() ©generated by Project Tree Generator Displaying Images ├─ streamlit-logo-secondary-colormark-darktext.png ![]() The actual images are located at content/images □ Markdown files are found inside the content/ directory while CSV files are located in content/figures. f-strings is then used to append the selected day into the relative URL so that the appropriate markdown and images are displayed. Practically, the user selects from a select box one of 30 possible options (Days 1-30) and a for loop is implemented to display one of 30 possible markdown/CSV files. The markdown file contains only the text while the CSV file contains the image file name and figure caption text. Instead of storing text and image URL inside a single long markdown file, I’ve split it into: markdown and CSV file. Conceptual explanation of the 30 Days app I’ve implemented something similar in the 30 Days of Streamlit app. What we want to achieve here is a unique use case that may require some creative solutions. You want to be able to read in several images from markdown files. (This code is from the line beginning here)Īha, I see what you mean. 'images/fastapi_wrapper_installation.gif', And it assumes markdown image statements appear in their own line in your. )Ĭhange the list of images and the base URL for your GitHub repo. This is an example of the trick I use when displaying my README.md files in Streamlit apps, which relies on the code being in GitHub, i.e. Images in st.markdown can only be loaded when served by a “server”.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |