Spaces:
Sleeping
Sleeping
File size: 7,842 Bytes
b17d9d3 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
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() |