import streamlit as st import influencer_ui import influencer_onboarding import base64 def get_base64_of_bin_file(bin_file): """ Converts a binary file to base64 encoding. """ with open(bin_file, 'rb') as file: data = file.read() return base64.b64encode(data).decode() def set_bg_from_local_image(local_img_path): """ Sets a local image as the background of the Streamlit app. """ bin_str = get_base64_of_bin_file(local_img_path) page_bg_img = f""" """ st.markdown(page_bg_img, unsafe_allow_html=True) def main(): # Page Configuration st.set_page_config(page_title="InstaImpact", layout="wide") set_bg_from_local_image('images/influencer_edited.png') # Sidebar for Navigation st.sidebar.title("Navigation") st.sidebar.markdown("Select the feature you want to explore:") # Define navigation options with a flag to indicate if they are enabled or disabled nav_options = ["Homepage", "Influencer Search", "Onboard Influencers", "Campaign Analytics", "Market Trends"] selection = st.sidebar.radio("Go to", nav_options) # Homepage if selection == "Homepage": st.markdown("

Welcome to InstaImpact

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

InstaImpact is your comprehensive tool for influencer marketing.

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

Platform Capabilities

", unsafe_allow_html=True) st.markdown("""
""", unsafe_allow_html=True) # Influencer Search elif selection == "Influencer Search": influencer_ui.show_influencer_search_page() # Add a navigation option for Onboarding elif selection == "Onboard Influencers": influencer_onboarding.show_onboarding_page() elif selection == "Campaign Analytics": st.header("Campaign Analytics") st.write("View and analyze your campaign performance - Coming Soon") elif selection == "Market Trends": st.header("Market Trends") st.write("Explore the latest trends in influencer marketing - Coming Soon") main()