import os import streamlit as st from lib.utils.file_processor import load_image from lib.utils.content_generators import content_planning_tools, ai_writers from lib.utils.alwrity_utils import ai_social_writer from lib.utils.seo_tools import ai_seo_tools from lib.utils.settings_page import render_settings_page def setup_ui(): """Set up the UI with custom styling.""" # Add custom CSS st.markdown(""" """, unsafe_allow_html=True) def setup_alwrity_ui(): """Sets up the main navigation in the sidebar.""" # Initialize session state for active tab if not exists if 'active_tab' not in st.session_state: st.session_state.active_tab = "Content Planning" # Define the navigation items with their icons and functions nav_items = { "Content Planning": ("📅", content_planning_tools), "AI Writers": ("📝", ai_writers), "Agents Teams": ("🤝", lambda: st.subheader("Agents Teams - Coming Soon!")), "AI SEO Tools": ("🔍", ai_seo_tools), "AI Social Tools": ("📱", ai_social_writer), "Ask Alwrity": ("💬", lambda: ( st.subheader("Chat with your Data, Chat with any Data.. COMING SOON !"), st.markdown("Create a collection by uploading files (PDF, MD, CSV, etc), or crawl a data source (Websites, more sources coming soon."), st.markdown("One can ask/chat, summarize and do semantic search over the uploaded data") )), "ALwrity Settings": ("⚙️", render_settings_page) } # Create sidebar navigation st.sidebar.markdown("### ALwrity Options") st.sidebar.markdown('', unsafe_allow_html=True) # Display content based on active tab st.title(f"{nav_items[st.session_state.active_tab][0]} {st.session_state.active_tab}") nav_items[st.session_state.active_tab][1]()