Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| from theme import apply_dark_theme, show_page_header, show_footer | |
| # Page config | |
| st.set_page_config( | |
| page_title="CiviDoc AI", | |
| page_icon="ποΈ", | |
| layout="centered", | |
| initial_sidebar_state="collapsed" | |
| ) | |
| # Apply dark theme | |
| st.markdown(apply_dark_theme(), unsafe_allow_html=True) | |
| def main(): | |
| # Header | |
| st.markdown(show_page_header( | |
| "<div style='text-align: center;'>" | |
| "ποΈ CiviDoc AI", | |
| "<div style='text-align: center;'>" | |
| "Your AI-powered companion for all government document needs", | |
| ), unsafe_allow_html=True) | |
| # Quick Access Section - Mobile Friendly Cards | |
| st.markdown( | |
| "<div class='grid'>" # Uses the responsive grid system | |
| "<div class='card' onclick='void(0)'>" # Added onclick for better touch feedback | |
| "<div style='text-align: center;'>" | |
| "<h3 style='margin-bottom: 0.5rem;'>π Document Analysis</h3>" | |
| "<p style='margin-bottom: 1rem;'>Upload and understand government documents instantly</p>" | |
| "<div class='status-badge status-success'>Ready to Use</div>" | |
| "</div>" | |
| "</div>" | |
| "<div class='card' onclick='void(0)'>" | |
| "<div style='text-align: center;'>" | |
| "<h3 style='margin-bottom: 0.5rem;'>βοΈ Writing Assistant</h3>" | |
| "<p style='margin-bottom: 1rem;'>Create professional government documents effortlessly</p>" | |
| "<div class='status-badge status-success'>Ready to Use</div>" | |
| "</div>" | |
| "</div>" | |
| "<div class='card' onclick='void(0)'>" | |
| "<div style='text-align: center;'>" | |
| "<h3 style='margin-bottom: 0.5rem;'>π¬ Document Chat</h3>" | |
| "<p style='margin-bottom: 1rem;'>Get instant answers about your documents</p>" | |
| "<div class='status-badge status-success'>Ready to Use</div>" | |
| "</div>" | |
| "</div>" | |
| "</div>", | |
| unsafe_allow_html=True | |
| ) | |
| # Quick Action Buttons - Touch Friendly | |
| st.markdown("<div class='touch-spacing'>", unsafe_allow_html=True) | |
| if st.button("π Start Document Analysis", use_container_width=True): | |
| st.switch_page("pages/1_π_Document_Analysis.py") | |
| if st.button("βοΈ Create New Document", use_container_width=True): | |
| st.switch_page("pages/3_βοΈ_Writing_Assistant.py") | |
| if st.button("π¬ Open Document Chat", use_container_width=True): | |
| st.switch_page("pages/2_π¬_Document_Chat.py") | |
| st.markdown("</div>", unsafe_allow_html=True) | |
| # Features Section - Responsive Grid | |
| st.markdown("<h3 style='margin: 1.5rem 0 1rem;'>π Key Features</h3>", unsafe_allow_html=True) | |
| # Features grid with improved mobile layout | |
| st.markdown( | |
| "<div class='grid'>" | |
| # Document Analysis Card | |
| "<div class='card'>" | |
| "<h3 style='margin-bottom: 0.75rem;'>π Document Analysis</h3>" | |
| "<div class='touch-spacing'>" | |
| "<p>β Instant document understanding</p>" | |
| "<p>β Complex term explanations</p>" | |
| "<p>β Form filling guidance</p>" | |
| "<p>β Requirement extraction</p>" | |
| "<p>β Deadline tracking</p>" | |
| "</div>" | |
| "</div>" | |
| # Writing Assistant Card | |
| "<div class='card'>" | |
| "<h3 style='margin-bottom: 0.75rem;'>βοΈ Writing Assistant</h3>" | |
| "<div class='touch-spacing'>" | |
| "<p>β RTI application generator</p>" | |
| "<p>β Complaint letter creator</p>" | |
| "<p>β Legal notice drafting</p>" | |
| "<p>β Appeal letter formatting</p>" | |
| "<p>β Custom document templates</p>" | |
| "</div>" | |
| "</div>" | |
| # Interactive Help Card | |
| "<div class='card'>" | |
| "<h3 style='margin-bottom: 0.75rem;'>π¬ Interactive Help</h3>" | |
| "<div class='touch-spacing'>" | |
| "<p>β Real-time document chat</p>" | |
| "<p>β Context-aware responses</p>" | |
| "<p>β Procedure explanations</p>" | |
| "<p>β Multi-document support</p>" | |
| "<p>β Instant clarifications</p>" | |
| "</div>" | |
| "</div>" | |
| # Document Management Card | |
| "<div class='card'>" | |
| "<h3 style='margin-bottom: 0.75rem;'>π Document Management</h3>" | |
| "<div class='touch-spacing'>" | |
| "<p>β Secure document storage</p>" | |
| "<p>β Version tracking</p>" | |
| "<p>β Easy organization</p>" | |
| "<p>β Quick retrieval</p>" | |
| "<p>β Status monitoring</p>" | |
| "</div>" | |
| "</div>" | |
| "</div>", | |
| unsafe_allow_html=True | |
| ) | |
| # How It Works Section - Mobile Friendly Steps | |
| st.markdown("<h3 style='margin: 1.5rem 0 1rem;'>π How It Works</h3>", unsafe_allow_html=True) | |
| st.markdown( | |
| "<div class='grid'>" # Responsive grid | |
| # Step 1 | |
| "<div class='card' style='text-align: center;'>" | |
| "<h4 style='margin-bottom: 0.5rem;'>1. Upload</h4>" | |
| "<p style='margin-bottom: 0.75rem;'>Upload your government documents or start creating new ones</p>" | |
| "<div class='progress-bar'><div class='progress-bar-fill' style='width: 25%;'></div></div>" | |
| "</div>" | |
| # Step 2 | |
| "<div class='card' style='text-align: center;'>" | |
| "<h4 style='margin-bottom: 0.5rem;'>2. Process</h4>" | |
| "<p style='margin-bottom: 0.75rem;'>Our AI analyzes and processes your documents instantly</p>" | |
| "<div class='progress-bar'><div class='progress-bar-fill' style='width: 50%;'></div></div>" | |
| "</div>" | |
| # Step 3 | |
| "<div class='card' style='text-align: center;'>" | |
| "<h4 style='margin-bottom: 0.5rem;'>3. Understand</h4>" | |
| "<p style='margin-bottom: 0.75rem;'>Get clear explanations and guidance for your documents</p>" | |
| "<div class='progress-bar'><div class='progress-bar-fill' style='width: 75%;'></div></div>" | |
| "</div>" | |
| # Step 4 | |
| "<div class='card' style='text-align: center;'>" | |
| "<h4 style='margin-bottom: 0.5rem;'>4. Act</h4>" | |
| "<p style='margin-bottom: 0.75rem;'>Take action with confidence using our recommendations</p>" | |
| "<div class='progress-bar'><div class='progress-bar-fill' style='width: 100%;'></div></div>" | |
| "</div>" | |
| "</div>", | |
| unsafe_allow_html=True | |
| ) | |
| # Additional Information - Mobile Friendly Layout | |
| st.markdown("<div class='grid'>", unsafe_allow_html=True) | |
| # Who Is This For Section | |
| st.markdown( | |
| "<div class='card'>" | |
| "<h3 style='margin-bottom: 0.75rem;'>π― Who Is This For?</h3>" | |
| "<div class='touch-spacing'>" | |
| "<p>β’ Citizens dealing with government procedures</p>" | |
| "<p>β’ RTI applicants and activists</p>" | |
| "<p>β’ Legal professionals</p>" | |
| "<p>β’ Government service seekers</p>" | |
| "<p>β’ Anyone needing document assistance</p>" | |
| "</div>" | |
| "</div>", | |
| unsafe_allow_html=True | |
| ) | |
| # Security & Privacy Section | |
| st.markdown( | |
| "<div class='card'>" | |
| "<h3 style='margin-bottom: 0.75rem;'>π‘οΈ Security & Privacy</h3>" | |
| "<div class='touch-spacing'>" | |
| "<p>β’ End-to-end encryption</p>" | |
| "<p>β’ Secure document processing</p>" | |
| "<p>β’ No permanent storage</p>" | |
| "<p>β’ Privacy-first approach</p>" | |
| "<p>β’ Regular security updates</p>" | |
| "</div>" | |
| "</div>", | |
| unsafe_allow_html=True | |
| ) | |
| st.markdown("</div>", unsafe_allow_html=True) | |
| # Footer | |
| st.markdown(show_footer(), unsafe_allow_html=True) | |
| if __name__ == "__main__": | |
| main() |