"""
def get_analysis_section(title: str, content: str) -> str:
- """Create an analysis section with title and content."""
+ """Returns HTML for an analysis section."""
return f"""
-
+
{title}
{content}
"""
def get_style_guide_html() -> str:
- """
- Get the style guide HTML content.
-
- Returns:
- str: HTML content for the style guide section
- """
+ """Returns HTML for the style guide section."""
return """
- ### How ALwrity Discovers Your Style
-
- **AI-Powered Style Analysis**
-
- ALwrity AI analyzes your existing content to understand your unique writing style and preferences. This helps us generate content that matches your voice perfectly.
-
- **Step 1: Content Analysis**
-
- We'll analyze your website content or written samples to understand:
-
- - Writing tone and voice
- - Vocabulary and language style
- - Content structure and formatting
- - Target audience and engagement style
-
- **Step 2: Style Recommendations**
-
- Based on the analysis, we'll provide:
-
- - Personalized writing guidelines
- - Content structure templates
- - Tone and voice recommendations
- - Audience engagement strategies
-
- **Step 3: Content Generation**
-
- Finally, we'll use these insights to:
-
- - Generate content that matches your style
- - Maintain consistency across all content
- - Optimize for your target audience
- - Ensure brand voice alignment
+
+
Style Guide
+
This section will contain your style guide and brand guidelines.
+
"""
def get_test_config_styles() -> str:
diff --git a/pages/test_config_settings.py b/lib/utils/test_config_settings.py
similarity index 99%
rename from pages/test_config_settings.py
rename to lib/utils/test_config_settings.py
index 1ab9a2c8..316c0de9 100644
--- a/pages/test_config_settings.py
+++ b/lib/utils/test_config_settings.py
@@ -148,8 +148,8 @@ def render_test_config_settings():
# Set session state for navigation
st.session_state.current_step = 4
st.session_state.next_step = "personalization_setup"
- # Navigate back to personalization setup
- st.switch_page("pages/personalization_setup.py")
+ # Navigate back to the main page where personalization setup is rendered
+ st.switch_page("alwrity.py")
# Title and description
st.title("π¨ Find Your Style with ALwrity")
diff --git a/lib/utils/ui_setup.py b/lib/utils/ui_setup.py
index fb54c9fd..e2b6d623 100644
--- a/lib/utils/ui_setup.py
+++ b/lib/utils/ui_setup.py
@@ -4,6 +4,7 @@ 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():
@@ -67,40 +68,73 @@ def setup_ui():
border-radius: 8px;
color: white;
}
+
+ /* Sidebar navigation styling */
+ .sidebar-nav {
+ padding: 1rem 0;
+ }
+
+ .nav-button {
+ width: 100%;
+ text-align: left;
+ padding: 0.5rem 1rem;
+ background: transparent;
+ border: none;
+ color: #2c3e50;
+ font-weight: 500;
+ cursor: pointer;
+ transition: all 0.3s ease;
+ margin: 0.2rem 0;
+ border-radius: 4px;
+ }
+
+ .nav-button:hover {
+ background: rgba(0,0,0,0.05);
+ padding-left: 1.5rem;
+ }
+
+ .nav-button.active {
+ background: #1565C0;
+ color: white;
+ }
""", unsafe_allow_html=True)
- image_base64 = load_image("lib/workspace/alwrity_logo.png")
- st.markdown(f"""
-
-

- Welcome to Alwrity!
-
- """, 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"
-def setup_tabs():
- """Sets up the main tabs in the Streamlit app."""
- tab1, tab2, tab3, tab4, tab5, tab6 = st.tabs(
- ["π
Content Planning", " ππ€AI Writers", "π€π€Agents Teams", "π οΈπAI SEO tools", "π±AI Social Tools", " π¬Ask Alwrity"])
- with tab1:
- content_planning_tools()
+ # 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)
+ }
- with tab2:
- ai_writers()
+ # Create sidebar navigation
+ st.sidebar.markdown("### ALwrity Options")
+ st.sidebar.markdown('', unsafe_allow_html=True)
- with tab6:
- 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_chat_docqa()
+ # 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]()
\ No newline at end of file
diff --git a/lib/workspace/AskAlwrity-min.ico b/lib/workspace/AskAlwrity-min.ico
new file mode 100644
index 00000000..abaf82ce
Binary files /dev/null and b/lib/workspace/AskAlwrity-min.ico differ
diff --git a/lib/workspace/alwrity_ui_styling.css b/lib/workspace/alwrity_ui_styling.css
index f9bc9f76..3a122176 100644
--- a/lib/workspace/alwrity_ui_styling.css
+++ b/lib/workspace/alwrity_ui_styling.css
@@ -13,13 +13,13 @@ body {
/* Main header styling */
.main-header {
- font-size: 2.5em;
+ font-size: 2em;
font-weight: bold;
color: #1565C0;
- margin-bottom: 20px;
+ margin-bottom: 2px;
text-align: center;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
- padding-top: 10px;
+ padding-top: 1px;
}
/* Sub-header styling */
@@ -32,49 +32,355 @@ body {
text-align: center;
}
-/* Navigation tabs styling */
-.stTabs [role="tab"] {
- font-size: 18px;
- font-weight: bold;
- color: white;
- background: #1565C0;
- padding: 6px 10px;
- margin: 5px;
+/* Enhanced Tab styling with dark red gradients */
+.stTabs {
+ margin-top: 0.5rem;
+ background: white;
+ padding: 0.5rem;
+ border-radius: 2px;
+ box-shadow: 0 2px 2px rgba(0, 0, 0, 0.05);
+}
+
+.stTabs [data-baseweb="tab-list"] {
+ gap: 8px;
+ background: linear-gradient(135deg, #f8fafc, #f1f5f9);
+ padding: 8px;
border-radius: 8px;
- border: 2px solid #ddd;
- transition: background 0.3s ease, padding 0.3s ease;
}
-.stTabs [role="tab"]:hover {
- background: #1976D2;
+.stTabs [data-baseweb="tab"] {
+ height: auto;
+ padding: 12px 20px;
+ color: #E2E8F0;
+ border-radius: 8px;
+ font-weight: 600;
+ font-size: 15px;
+ background: linear-gradient(135deg, #4A5568, #2D3748);
+ border: 1px solid rgba(255, 255, 255, 0.1);
+ transition: all 0.3s ease;
+ letter-spacing: 0.3px;
+ background: white;
+ border-radius: 6px;
+ padding: 8px 16px;
+ font-weight: 600;
+ color: #475569;
+ transition: all 0.2s ease;
}
-.stTabs [role="tab"][aria-selected="true"] {
- background: #E3F2FD;
- color: #333;
- border: 2px solid #1565C0;
- font-weight: bold;
+.stTabs [data-baseweb="tab"]:hover {
+ color: #FFFFFF;
+ background: linear-gradient(135deg, #822727, #991B1B);
+ border-color: rgba(255, 255, 255, 0.2);
+ transform: translateY(-1px);
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
+ background: #f1f5f9;
+ color: #1e293b;
}
-/* Sidebar header styling */
-.sidebar-header {
- font-size: 1.5em;
- font-weight: bold;
- color: #333;
- margin-bottom: 20px;
+.stTabs [data-baseweb="tab"][aria-selected="true"] {
+ color: #FFFFFF;
+ background: linear-gradient(135deg, #3182CE, #2C5282);
+ border-color: #DC2626;
+ box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
+ position: relative;
+ background: linear-gradient(135deg, #3182ce, #2c5282);
+ color: white;
}
-/* Sidebar option styling */
-.sidebar-option {
- margin-bottom: 10px;
- font-size: 1.5em;
- color: #1565C0;
+.stTabs [data-baseweb="tab"][aria-selected="true"]::after {
+ content: '';
+ position: absolute;
+ bottom: -2px;
+ left: 10%;
+ width: 80%;
+ height: 2px;
+ background: linear-gradient(90deg, transparent, #FFFFFF, transparent);
+ border-radius: 2px;
+}
+
+.stTabs [data-baseweb="tab-panel"] {
+ padding: 20px;
+ background: linear-gradient(135deg, #FFFFFF, #F8FAFC);
+ border-radius: 12px;
+ margin-top: 10px;
+ border: 1px solid rgba(226, 232, 240, 0.8);
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
+}
+
+/* Enhanced tab content for better readability */
+.stTabs [data-baseweb="tab-panel"] p {
+ color: #1A202C;
+ line-height: 1.7;
+ font-size: 15px;
+}
+
+.stTabs [data-baseweb="tab-panel"] ul {
+ margin-top: 1rem;
+ margin-bottom: 1rem;
+ padding-left: 1.5rem;
+}
+
+.stTabs [data-baseweb="tab-panel"] li {
+ color: #2D3748;
+ margin-bottom: 0.5rem;
+ line-height: 1.6;
+}
+
+/* Tab content headings */
+.stTabs [data-baseweb="tab-panel"] strong {
+ color: #1A202C;
+ font-weight: 600;
+ font-size: 16px;
+}
+
+/* Success/Warning messages in tabs */
+.stTabs [data-baseweb="tab-panel"] .stSuccess,
+.stTabs [data-baseweb="tab-panel"] .stWarning {
+ margin-top: 1rem;
+ margin-bottom: 1rem;
+ border-radius: 8px;
+}
+
+/* Main Application Tabs */
+.tab-container {
+ background: linear-gradient(135deg, #1A202C, #2D3748);
+ border-radius: 16px;
+ padding: 20px;
+ margin: 20px 0;
+ box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
+}
+
+.tab-content {
+ background: linear-gradient(135deg, #FFFFFF, #F8FAFC);
+ border-radius: 12px;
+ padding: 25px;
+ margin-top: 15px;
+ border: 1px solid rgba(226, 232, 240, 0.8);
+ box-shadow: 0 6px 12px rgba(0, 0, 0, 0.05);
+}
+
+/* Tab Content Typography */
+.tab-content h1, .tab-content h2, .tab-content h3 {
+ color: #2D3748;
+ margin-bottom: 1rem;
+ font-weight: 600;
+}
+
+.tab-content p {
+ color: #4A5568;
+ line-height: 1.8;
+ margin-bottom: 1rem;
+}
+
+/* Custom Scrollbar for Tab Content */
+.tab-content::-webkit-scrollbar {
+ width: 8px;
+}
+
+.tab-content::-webkit-scrollbar-track {
+ background: #F7FAFC;
+ border-radius: 4px;
+}
+
+.tab-content::-webkit-scrollbar-thumb {
+ background: linear-gradient(135deg, #CBD5E0, #A0AEC0);
+ border-radius: 4px;
+}
+
+.tab-content::-webkit-scrollbar-thumb:hover {
+ background: linear-gradient(135deg, #A0AEC0, #718096);
+}
+
+/* Enhanced Tab Indicators */
+.stTabs [data-baseweb="tab"][aria-selected="true"]::before {
+ content: '';
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background: rgba(255, 255, 255, 0.1);
+ border-radius: 8px;
+ z-index: -1;
+ animation: tabPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
+}
+
+@keyframes tabPulse {
+ 0%, 100% { opacity: 0.5; }
+ 50% { opacity: 1; }
+}
+
+/* Text Inputs */
+.stTextInput > div {
+ background: #FFFFFF;
+}
+
+.stTextInput > div > div > input {
+ background: #F7FAFC;
+ border: 2px solid #E2E8F0;
+ border-radius: 10px;
+ padding: 12px 16px;
+ font-size: 15px;
+ color: #2D3748;
+ transition: all 0.3s ease;
+}
+
+.stTextInput > div > div > input:hover {
+ border-color: #CBD5E0;
+ background: #EDF2F7;
+}
+
+.stTextInput > div > div > input:focus {
+ border-color: #C53030;
+ box-shadow: 0 0 0 3px rgba(197, 48, 48, 0.2);
+ background: #FFFFFF;
+}
+
+/* Sidebar container styling - subtle modern gradient */
+[data-testid="stSidebar"] {
+ background: linear-gradient(135deg, #f8fafc, #f1f5f9);
+ color: #334155;
+ padding: 20px;
+ border-right: 1px solid rgba(148, 163, 184, 0.2);
+ box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
+ transition: width 0.3s ease-in-out !important;
+}
+
+/* Collapsed sidebar styling */
+[data-testid="stSidebar"][aria-expanded="false"] {
+ margin-left: -21rem;
+}
+
+/* Sidebar title styling - improved contrast */
+[data-testid="stSidebar"] h1, [data-testid="stSidebar"] h2, [data-testid="stSidebar"] h3 {
+ color: #1e293b;
+ font-weight: 600;
+ margin-bottom: 1.5rem;
+ letter-spacing: 0.02em;
+ border-bottom: 2px solid #e2e8f0;
+ padding-bottom: 0.75rem;
+}
+
+/* Sidebar expander styling - modern and subtle */
+[data-testid="stSidebar"] .st-expander {
+ background: linear-gradient(135deg, #ffffff, #f8fafc);
+ border: 1px solid #e2e8f0;
+ border-radius: 8px;
+ margin-bottom: 1rem;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
+ overflow: hidden;
+}
+
+[data-testid="stSidebar"] .st-expander > div:first-child {
+ color: #334155;
+ font-weight: 600;
+ padding: 0.875rem 1rem;
+ background: linear-gradient(135deg, #f8fafc, #f1f5f9);
+ border-bottom: 1px solid #e2e8f0;
+}
+
+/* Radio button styling - improved visibility */
+[data-testid="stSidebar"] .stRadio > div {
+ display: flex;
+ flex-direction: column;
+ gap: 0.625rem;
+}
+
+[data-testid="stSidebar"] .stRadio > div > label {
+ background: #ffffff;
+ color: #334155;
+ padding: 0.75rem 1rem;
+ border-radius: 6px;
+ font-weight: 500;
+ border: 1px solid #e2e8f0;
+ transition: all 0.2s ease;
+}
+
+[data-testid="stSidebar"] .stRadio > div > label:hover {
+ background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
+ transform: translateY(-1px);
+ border-color: #cbd5e1;
+}
+
+[data-testid="stSidebar"] .stRadio > div > label[data-selected="true"] {
+ background: linear-gradient(135deg, #0ea5e9, #0284c7);
+ color: #ffffff;
+ border-color: #0284c7;
+ box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
+}
+
+/* Input and select styling - improved contrast */
+[data-testid="stSidebar"] input, [data-testid="stSidebar"] select {
+ background: #ffffff;
+ color: #334155;
+ border: 1px solid #e2e8f0;
+ border-radius: 6px;
+ padding: 0.75rem;
+ font-size: 0.875rem;
+ margin-bottom: 0.75rem;
+ transition: all 0.2s ease;
+}
+
+[data-testid="stSidebar"] input:focus, [data-testid="stSidebar"] select:focus {
+ border-color: #0ea5e9;
+ box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.1);
+ outline: none;
+}
+
+/* Button styling - modern and subtle */
+[data-testid="stSidebar"] button {
+ background: linear-gradient(135deg, #0ea5e9, #0284c7);
+ color: #ffffff;
+ border: none;
+ border-radius: 6px;
+ padding: 0.75rem 1rem;
+ font-weight: 500;
cursor: pointer;
- transition: color 0.3s ease;
+ transition: all 0.2s ease;
}
-.sidebar-option:hover {
- color: #1976D2;
+[data-testid="stSidebar"] button:hover {
+ background: linear-gradient(135deg, #0284c7, #0369a1);
+ transform: translateY(-1px);
+ box-shadow: 0 2px 4px rgba(2, 132, 199, 0.2);
+}
+
+/* Settings button styling */
+[data-testid="stSidebar"] .stButton > button {
+ background: linear-gradient(135deg, #3182CE, #2C5282);
+ color: white;
+ border: none;
+ padding: 0.75rem 1rem;
+ font-weight: 600;
+ border-radius: 8px;
+ transition: all 0.3s ease;
+ width: 100%;
+ margin-bottom: 1rem;
+}
+
+[data-testid="stSidebar"] .stButton > button:hover {
+ background: linear-gradient(135deg, #2C5282, #1A365D);
+ transform: translateY(-2px);
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+}
+
+/* Scrollbar styling - subtle and modern */
+[data-testid="stSidebar"]::-webkit-scrollbar {
+ width: 8px;
+}
+
+[data-testid="stSidebar"]::-webkit-scrollbar-track {
+ background: #f8fafc;
+}
+
+[data-testid="stSidebar"]::-webkit-scrollbar-thumb {
+ background: #cbd5e1;
+ border-radius: 4px;
+ border: 2px solid #f8fafc;
+}
+
+[data-testid="stSidebar"]::-webkit-scrollbar-thumb:hover {
+ background: #94a3b8;
}
/* Content section styling */
@@ -86,7 +392,6 @@ body {
background-color: #ffffff;
}
-
/* Custom button styling */
div.stButton > button:first-child {
background: #1565C0;
@@ -203,3 +508,169 @@ select option {
padding: 10px;
}
+/* Content Planning Tools Styling */
+.content-header {
+ background: linear-gradient(135deg, #f8fafc, #f1f5f9);
+ padding: 1rem;
+ border-radius: 2px;
+ margin-bottom: 2rem;
+ border: 1px solid rgba(148, 163, 184, 0.2);
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
+}
+
+.content-header h2 {
+ color: #1e293b;
+ font-size: 1rem;
+ font-weight: 300;
+ margin-bottom: 0.5rem;
+}
+
+.content-header .subtitle {
+ color: #475569;
+ font-size: 1.1rem;
+ line-height: 1;
+}
+
+.tool-section {
+ background: white;
+ padding: 1rem;
+ border-radius: 2px;
+ margin-bottom: 1.5rem;
+ border: 1px solid #e2e8f0;
+}
+
+.tool-section h3 {
+ color: #1e293b;
+ font-size: 1.4rem;
+ font-weight: 600;
+ margin-bottom: 0.75rem;
+}
+
+.tool-section p {
+ color: #475569;
+ font-size: 1rem;
+ line-height: 1.5;
+}
+
+/* Button styling */
+.stButton > button {
+ background: linear-gradient(135deg, #3182ce, #2c5282);
+ color: white;
+ border: none;
+ padding: 0.75rem 1.5rem;
+ font-weight: 600;
+ border-radius: 8px;
+ transition: all 0.3s ease;
+}
+
+.stButton > button:hover {
+ background: linear-gradient(135deg, #2c5282, #1a365d);
+ transform: translateY(-2px);
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+}
+
+/* Search option containers styling */
+.search-option-container {
+ background: linear-gradient(135deg, #f8fafc, #f1f5f9);
+ border: 1px solid rgba(148, 163, 184, 0.2);
+ border-radius: 8px;
+ padding: 1rem;
+ margin-bottom: 1rem;
+ text-align: center;
+ height: 100%;
+ transition: all 0.3s ease;
+}
+
+.search-option-container:hover {
+ transform: translateY(-2px);
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
+}
+
+.search-option-container h4 {
+ color: #1e293b;
+ margin-bottom: 0.5rem;
+}
+
+.search-option-container p {
+ color: #64748b;
+ margin: 0;
+}
+
+/* Button styling for search options */
+.stButton > button {
+ background: linear-gradient(135deg, #3182ce, #2c5282);
+ color: white;
+ border: none;
+ padding: 0.5rem 1rem;
+ font-weight: 600;
+ border-radius: 6px;
+ transition: all 0.3s ease;
+}
+
+.stButton > button:disabled {
+ background: linear-gradient(135deg, #94a3b8, #64748b);
+ cursor: not-allowed;
+}
+
+.stButton > button:not(:disabled):hover {
+ background: linear-gradient(135deg, #2c5282, #1e3a8a);
+ transform: translateY(-1px);
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+}
+
+/* Search options styling */
+.search-option {
+ background: linear-gradient(135deg, #f8fafc, #f1f5f9);
+ border: 1px solid rgba(148, 163, 184, 0.2);
+ border-radius: 8px;
+ padding: 1rem;
+ height: 100%;
+ transition: all 0.3s ease;
+ text-align: center;
+}
+
+.search-option:hover {
+ transform: translateY(-2px);
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
+}
+
+.search-option h4 {
+ color: #1e293b;
+ margin-bottom: 0.5rem;
+ font-weight: 600;
+}
+
+.search-option p {
+ color: #64748b;
+ font-size: 0.9em;
+ margin-bottom: 1rem;
+}
+
+.search-option.active {
+ border: 2px solid #3182ce;
+ background: linear-gradient(135deg, #ebf8ff, #e6fffa);
+}
+
+/* Add these to your existing search-option styles */
+.search-option.disabled {
+ background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
+ opacity: 0.8;
+ cursor: not-allowed;
+ border: 1px solid #cbd5e1;
+}
+
+
+.search-option .api-missing {
+ display: inline-block;
+ background: #fee2e2;
+ color: #dc2626;
+ padding: 2px 8px;
+ border-radius: 4px;
+ font-size: 0.8em;
+ margin-top: 0.5rem;
+}
+
+.search-option.disabled h4,
+.search-option.disabled p {
+ color: #64748b;
+}
\ No newline at end of file
diff --git a/lib/workspace/structured_data_seo.mp4 b/lib/workspace/structured_data_seo.mp4
deleted file mode 100644
index af177027..00000000
Binary files a/lib/workspace/structured_data_seo.mp4 and /dev/null differ
diff --git a/pages/ai_research_setup_page.py b/pages/ai_research_setup_page.py
deleted file mode 100644
index 5d094cd4..00000000
--- a/pages/ai_research_setup_page.py
+++ /dev/null
@@ -1,50 +0,0 @@
-"""Page for AI Research Setup redirection."""
-
-import streamlit as st
-from loguru import logger
-import sys
-import os
-
-# Configure logger
-logger.remove() # Remove default handler
-logger.add(
- "logs/ai_research_setup_page.log",
- rotation="500 MB",
- retention="10 days",
- level="DEBUG",
- format="{time:YYYY-MM-DD HH:mm:ss} | {level} | {message}",
- backtrace=True,
- diagnose=True
-)
-logger.add(
- sys.stdout,
- level="INFO",
- format="
{time:YYYY-MM-DD HH:mm:ss} |
{level: <8} |
{message}"
-)
-
-# Set page config
-st.set_page_config(
- layout="wide",
- initial_sidebar_state="collapsed",
- menu_items={
- 'Get Help': None,
- 'Report a bug': None,
- 'About': None
- }
-)
-
-def render_ai_research_setup_page():
- """Render the AI Research Setup page."""
- try:
- logger.info("Starting AI Research Setup page")
-
- # Import and render the AI Research Setup component
- from lib.utils.api_key_manager.components.ai_research_setup import render_ai_research_setup
- render_ai_research_setup()
-
- except Exception as e:
- logger.error(f"Error in render_ai_research_setup_page: {str(e)}")
- st.error(f"An error occurred: {str(e)}")
-
-if __name__ == "__main__":
- render_ai_research_setup_page()
\ No newline at end of file
diff --git a/pages/personalization_setup.py b/pages/personalization_setup.py
deleted file mode 100644
index d35e9930..00000000
--- a/pages/personalization_setup.py
+++ /dev/null
@@ -1,84 +0,0 @@
-import streamlit as st
-import os
-import json
-from pathlib import Path
-
-st.set_page_config(
- page_title="Personalization Setup",
- page_icon="βοΈ",
- layout="wide"
-)
-
-st.title("Personalization Setup")
-
-# Initialize session state for active tab if not exists
-if 'active_tab' not in st.session_state:
- st.session_state.active_tab = "Writing Preferences"
-
-# Create tabs for different sections
-tab1, tab2 = st.tabs(["Writing Preferences", "AI Configuration"])
-
-with tab1:
- st.write("""
- This section allows you to customize your AI writing experience.
- Configure your preferences and settings here.
- """)
-
- # Add your personalization options here
- st.subheader("Writing Style Preferences")
- tone = st.selectbox(
- "Select your preferred writing tone",
- ["Professional", "Casual", "Academic", "Creative"]
- )
-
- st.subheader("Content Preferences")
- content_type = st.multiselect(
- "Select your preferred content types",
- ["Blog Posts", "Articles", "Social Media", "Technical Writing", "Creative Writing"]
- )
-
- if st.button("Save Preferences"):
- st.success("Your preferences have been saved!")
-
-with tab2:
- st.subheader("AI Configuration Settings")
-
- # Create a form for AI configuration
- with st.form("ai_config_form"):
- # API Keys
- st.text_input("OpenAI API Key", type="password", key="openai_key")
- st.text_input("Google API Key", type="password", key="google_key")
- st.text_input("SerpAPI Key", type="password", key="serpapi_key")
-
- # Model Selection
- st.selectbox("Select Model", ["gpt-3.5-turbo", "gpt-4"], key="model")
-
- # Temperature
- st.slider("Temperature", 0.0, 2.0, 0.7, 0.1, key="temperature")
-
- # Max Tokens
- st.number_input("Max Tokens", 100, 4000, 2000, 100, key="max_tokens")
-
- # Submit button
- submitted = st.form_submit_button("Save Configuration")
-
- if submitted:
- # Create config directory if it doesn't exist
- config_dir = Path("config")
- config_dir.mkdir(exist_ok=True)
-
- # Save configuration
- config = {
- "openai_key": st.session_state.openai_key,
- "google_key": st.session_state.google_key,
- "serpapi_key": st.session_state.serpapi_key,
- "model": st.session_state.model,
- "temperature": st.session_state.temperature,
- "max_tokens": st.session_state.max_tokens
- }
-
- config_file = config_dir / "test_config.json"
- with open(config_file, "w") as f:
- json.dump(config, f, indent=4)
-
- st.success("Configuration saved successfully!")
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
index 4760f08b..881f53b4 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -6,7 +6,7 @@ beautifulsoup4==4.12.2
aiohttp>=3.11.11
openai>=1.3.7
PyPDF2>=3.0.1
-google-generativeai<0.9.0,>=0.8.0
+google-genai==1.9.0
anthropic>=0.18.1
tenacity>=8.2.3
tabulate>=0.9.0