-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
85 lines (72 loc) · 2.63 KB
/
app.py
File metadata and controls
85 lines (72 loc) · 2.63 KB
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
"""
TaxCode AI - Intelligent Tax Strategy Engine
AI-powered tax optimization using RAG over IRC tax code
"""
import streamlit as st
from src.document_processor import DocumentProcessor
from src.irc_scanner import IRCScanner
from src.strategy_engine import StrategyEngine
from src.compliance_checker import ComplianceChecker
st.set_page_config(
page_title="TaxCode AI",
page_icon="📋",
layout="wide"
)
def main():
st.title("📋 TaxCode AI")
st.subheader("Intelligent Tax Strategy Engine")
# Sidebar
with st.sidebar:
st.header("Document Upload")
uploaded_files = st.file_uploader(
"Upload tax documents",
type=['pdf', 'xlsx', 'csv'],
accept_multiple_files=True
)
tax_year = st.selectbox("Tax Year", [2025, 2024, 2023, 2022])
filing_status = st.selectbox(
"Filing Status",
["Single", "Married Filing Jointly", "Married Filing Separately", "Head of Household"]
)
# Main content
col1, col2 = st.columns(2)
with col1:
st.header("📄 Imported Documents")
if uploaded_files:
for file in uploaded_files:
st.success(f"✓ {file.name}")
else:
st.info("Upload documents to begin analysis")
with col2:
st.header("🔍 IRC Code Analysis")
st.info("Scanning 75,000+ pages of tax code...")
# Strategy results
st.header("💰 Optimization Results")
# Sample results display
metrics_col1, metrics_col2, metrics_col3 = st.columns(3)
with metrics_col1:
st.metric("Potential Savings", "$47,832", "+12.3%")
with metrics_col2:
st.metric("Deductions Found", "14", "+3 vs last year")
with metrics_col3:
st.metric("Compliance Score", "100%", "Audit Ready")
# Deduction breakdown
st.subheader("Deduction Breakdown")
deductions = [
{"section": "§ 179", "title": "Business Property Expense", "savings": 18200},
{"section": "§ 199A", "title": "QBI Deduction", "savings": 12450},
{"section": "§ 401(k)", "title": "Retirement Contributions", "savings": 6500},
{"section": "§ 280A", "title": "Home Office", "savings": 4200},
{"section": "§ 170", "title": "Charitable Contributions", "savings": 3800},
{"section": "§ 164", "title": "SALT Deduction", "savings": 2682},
]
for d in deductions:
col1, col2, col3 = st.columns([1, 3, 1])
with col1:
st.code(d["section"])
with col2:
st.write(d["title"])
with col3:
st.success(f"${d['savings']:,}")
if __name__ == "__main__":
main()