import os import streamlit as st from PIL import Image from modules.paths import STATIC_PATH_IMAGE from modules.dataset import load_datasets def show_welcome_view(): """Display the welcome view with two columns layout and confirmation button""" # Container for welcome view with st.container(): # Create two columns col1, col2 = st.columns([3, 2]) with col1: # Title with custom styling st.markdown("""

Barkley: Tree Bark Image Classification

""", unsafe_allow_html=True) # Introduction text st.markdown("""

Explore the fascinating world of trees through their unique bark patterns. Whether you're a botanist, researcher, or nature enthusiast, Barkley helps you identify tree species with just a photo. Nestled within the serene surroundings of the First Asia Institute of Technology and Humanities Colleges, our project sheds light on the distinctive barks of 13 indigenous species prevalent in this locale.

""", unsafe_allow_html=True) # Species lists species_items, _, _ = load_datasets() species_lists = "".join([f"
  • {item['title']}
  • " for item in species_items[:4]]) species_lists += "
  • and more...
  • " html_content = f"""

    These encompass:

    """ st.markdown(html_content, unsafe_allow_html=True) # Add some space before the button st.write("") st.write("") # Confirmation checkbox and button understand = st.checkbox(label="**I understand the purpose of this application**") if understand: st.session_state.welcome_shown = True st.rerun() with col2: # Load and display the image with some styling welcome_image = Image.open(os.path.join(STATIC_PATH_IMAGE, 'preview_placeholder.jpg')) st.image( welcome_image, use_container_width=True, )