File size: 31,584 Bytes
c84b309
 
5a1d87a
c84b309
73e3af5
5a1d87a
bb469d7
c84b309
5a1d87a
44398c8
5a1d87a
73e3af5
 
79bd1cd
bb469d7
 
 
e0050d6
bb469d7
 
 
e0050d6
bb469d7
 
e0050d6
bb469d7
 
 
e0050d6
bb469d7
 
e0050d6
bb469d7
 
 
e0050d6
bb469d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
701de7d
73e3af5
701de7d
 
73e3af5
c84b309
 
3b8a813
73e3af5
 
c84b309
 
 
73e3af5
c84b309
 
 
3b8a813
 
c84b309
701de7d
c84b309
3b8a813
c84b309
3b8a813
c84b309
3b8a813
c84b309
5a1d87a
6319164
 
 
701de7d
 
 
 
3b8a813
 
 
6319164
 
 
701de7d
 
 
3b8a813
6319164
 
701de7d
 
 
3b8a813
6319164
701de7d
6319164
3b8a813
6319164
 
 
3b8a813
 
5a1d87a
3b8a813
 
 
701de7d
 
 
3b8a813
 
 
 
 
701de7d
 
 
 
 
3b8a813
701de7d
3b8a813
 
 
 
 
 
6319164
5a1d87a
6319164
 
3b8a813
701de7d
 
44398c8
701de7d
6319164
 
 
 
701de7d
6319164
 
 
701de7d
3b8a813
 
5a1d87a
3b8a813
6319164
 
 
 
701de7d
3b8a813
6319164
 
 
3b8a813
6319164
 
 
 
 
3b8a813
701de7d
5a1d87a
 
6319164
 
3b8a813
6319164
44398c8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5a1d87a
701de7d
 
 
5a1d87a
 
 
 
44398c8
 
5a1d87a
 
 
 
 
 
 
701de7d
5a1d87a
 
 
 
 
743370e
5a1d87a
 
701de7d
 
 
5a1d87a
 
44499a2
 
 
 
 
 
5a1d87a
 
 
 
 
701de7d
 
 
5a1d87a
 
 
 
 
 
44499a2
d9e814c
5a1d87a
 
 
d9e814c
5a1d87a
 
d9e814c
 
 
 
5a1d87a
 
 
 
 
 
 
743370e
5a1d87a
 
d9e814c
5a1d87a
 
 
 
701de7d
 
 
5a1d87a
 
d9e814c
 
 
 
 
5a1d87a
 
 
 
701de7d
 
 
5a1d87a
 
e589f35
d9e814c
 
5a1d87a
 
d9e814c
5a1d87a
e589f35
d9e814c
5a1d87a
44398c8
d9e814c
5a1d87a
 
 
d9e814c
701de7d
 
 
d9e814c
743370e
 
 
44499a2
d9e814c
743370e
d9e814c
 
 
743370e
d9e814c
 
743370e
 
 
 
d9e814c
743370e
d9e814c
 
 
743370e
d9e814c
 
 
 
 
743370e
d9e814c
 
 
 
743370e
d9e814c
743370e
d9e814c
743370e
 
 
 
d9e814c
 
 
 
 
 
743370e
d9e814c
 
 
 
 
 
 
 
743370e
d9e814c
 
743370e
d9e814c
743370e
 
d9e814c
 
 
 
743370e
d9e814c
 
 
 
 
79bd1cd
 
 
cdaada6
5a1d87a
b2c6b2e
5a1d87a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e589f35
 
 
 
 
 
 
 
 
 
 
 
743370e
e589f35
5a1d87a
e589f35
743370e
e589f35
 
 
743370e
 
 
 
e589f35
 
 
5a1d87a
 
 
37d7dc5
5a1d87a
544e3c1
5a1d87a
3b8a813
37d7dc5
 
e589f35
 
 
 
 
 
 
 
 
12c5adf
e589f35
12c5adf
e589f35
 
12c5adf
e589f35
 
 
 
 
 
 
 
 
a00438e
e589f35
 
 
 
743370e
 
 
e589f35
 
743370e
 
 
 
e589f35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a00438e
e589f35
 
44499a2
e589f35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d9e814c
e589f35
d9e814c
 
e589f35
 
bb469d7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e589f35
a00438e
e589f35
 
 
 
 
 
 
 
 
 
 
 
 
d9e814c
 
bb469d7
d9e814c
 
 
 
 
743370e
 
 
 
bb469d7
743370e
bb469d7
743370e
a00438e
743370e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d9e814c
b00a729
701de7d
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
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
import gradio as gr
import plotly.graph_objects as go
import requests
from datetime import datetime, timedelta
import logging
import random
from transformers import pipeline

# =============================================================================
# Setup Logging
# =============================================================================
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s')

# =============================================================================
# Load In-House Hugging Face Models for AI Agents with Fallbacks
# =============================================================================
try:
    summarizer = pipeline("summarization", model="myorg/inhouse-summarizer")
    logging.info("Loaded in-house summarizer.")
except Exception as e:
    logging.error("In-house summarizer not found, falling back: %s", e)
    summarizer = pipeline("summarization", model="facebook/bart-large-cnn")

try:
    research_generator = pipeline("text-generation", model="myorg/inhouse-research", max_length=100)
    logging.info("Loaded in-house research generator.")
except Exception as e:
    logging.error("In-house research generator not found, falling back: %s", e)
    research_generator = pipeline("text-generation", model="gpt2", max_length=100)

try:
    planner_generator = pipeline("text-generation", model="myorg/inhouse-planner", max_length=150)
    logging.info("Loaded in-house planner generator.")
except Exception as e:
    logging.error("In-house planner generator not found, falling back: %s", e)
    planner_generator = pipeline("text-generation", model="gpt2", max_length=150)

# =============================================================================
# In-House Agent Functions
# =============================================================================
def report_agent(data):
    """
    Generates a summary report using the in-house summarizer model.
    """
    if not data or len(data.strip()) == 0:
        return "Please provide input text for summarization."
    try:
        summary = summarizer(data, max_length=130, min_length=30, do_sample=False)
        logging.debug("Summary generated using in-house summarizer.")
        return summary[0]['summary_text']
    except Exception as e:
        logging.error("Error generating summary: %s", e)
        return "Error generating summary."

def planning_agent(goal):
    """
    Generates a detailed action plan based on the provided goal using the in-house planner model.
    """
    if not goal or len(goal.strip()) == 0:
        return "Please provide a goal for planning."
    try:
        plan = planner_generator(goal, max_length=150, num_return_sequences=1)
        logging.debug("Plan generated using in-house planner.")
        return plan[0]['generated_text']
    except Exception as e:
        logging.error("Error generating plan: %s", e)
        return "Error generating plan."

def research_agent(query):
    """
    Generates research insights based on the provided query using the in-house research generator.
    """
    if not query or len(query.strip()) == 0:
        return "Please provide a research query."
    try:
        result = research_generator(query, max_length=100, num_return_sequences=1)
        logging.debug("Research output generated using in-house research model.")
        return result[0]['generated_text']
    except Exception as e:
        logging.error("Error generating research output: %s", e)
        return "Error generating research output."

# =============================================================================
# Helper Functions: Interactive Chart Generators
# =============================================================================
def create_performance_comparison():
    """
    Creates a performance comparison chart showing current (2GB VRAM) capabilities
    versus potential performance with a GPU upgrade.
    """
    categories = [
        'AI Model Loading',
        'Local AI Assistants',
        'VS Code Extensions',
        'Image Processing',
        'Multi-tasking',
        'Large Dataset Analysis'
    ]
    current_values = [20, 15, 10, 18, 25, 12]
    potential_values = [100, 100, 100, 100, 100, 100]
    
    fig = go.Figure(data=[
        go.Bar(name='Current Setup (2GB VRAM)', x=categories, y=current_values, marker_color='#94A3B8'),
        go.Bar(name='With GPU Upgrade', x=categories, y=potential_values, marker_color='#2563EB')
    ])
    
    fig.update_layout(
        title={'text': 'What I Can Do vs What I Could Do', 'font': {'size': 24}},
        barmode='group',
        yaxis_title='Capability (%)',
        plot_bgcolor='white',
        font={'family': 'Arial', 'size': 14}
    )
    logging.debug("Performance comparison chart created.")
    return fig

def create_roi_projection():
    """
    Creates a 6-month ROI projection chart showing the current revenue path versus
    the projected revenue path with a GPU upgrade.
    """
    months = ['Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug']
    current_revenue = [1000, 1200, 1400, 1600, 1800, 2000]
    projected_revenue = [1000, 1500, 2250, 3400, 5100, 7650]
    
    fig = go.Figure()
    fig.add_trace(go.Scatter(
        x=months, 
        y=current_revenue,
        name='Current Path',
        line={'color': '#94A3B8', 'width': 3}
    ))
    fig.add_trace(go.Scatter(
        x=months, 
        y=projected_revenue,
        name='With GPU Upgrade',
        line={'color': '#2563EB', 'width': 3}
    ))
    
    fig.update_layout(
        title={'text': '6-Month Revenue Projection', 'font': {'size': 24}},
        xaxis_title='Month',
        yaxis_title='Revenue (USD)',
        plot_bgcolor='white',
        font={'family': 'Arial', 'size': 14}
    )
    logging.debug("ROI projection chart created.")
    return fig

def create_earnings_history():
    """
    Creates an earnings history visualization using personal pay data.
    """
    dates = ["2024-12-10", "2024-12-17", "2024-12-24", "2024-12-31", "2025-01-07",
             "2025-01-14", "2025-01-21", "2025-01-28", "2025-02-04", "2025-02-11"]
    earnings = [156.02, 73.10, 97.07, 116.11, 79.05, 86.62, 54.57, 86.36, 61.50, 79.18]
    
    fig = go.Figure(data=go.Scatter(
        x=dates, 
        y=earnings, 
        mode='lines+markers',
        line={'color': '#2563EB', 'width': 3},
        name='Earnings'
    ))
    
    fig.update_layout(
        title={'text': 'Recent Earnings History', 'font': {'size': 24}},
        xaxis_title='Date',
        yaxis_title='Amount (USD)',
        plot_bgcolor='white',
        font={'family': 'Arial', 'size': 14}
    )
    logging.debug("Earnings history chart created.")
    return fig

def calculate_loan_schedule(loan_amount=3000, interest_rate=5.0):
    """
    Calculates the loan repayment schedule given an investment amount and interest rate.
    Returns a formatted string detailing monthly payments and timelines.
    """
    try:
        amount = float(loan_amount)
        annual_rate = float(interest_rate) / 100
        monthly_rate = annual_rate / 12
        grace_period = 2  # Two-month grace period for setup
        repayment_period = 12
        
        monthly_payment = amount * (monthly_rate * (1 + monthly_rate) ** repayment_period) / ((1 + monthly_rate) ** repayment_period - 1)
        
        schedule = "💰 **Investment Breakdown & Repayment Plan**\n\n"
        schedule += f"**Initial Investment:** ${amount:,.2f}\n"
        schedule += f"**Grace Period:** {grace_period} months to set everything up\n"
        schedule += f"**Monthly Payment:** ${monthly_payment:,.2f} (starting month {grace_period + 1})\n\n"
        
        remaining_balance = amount
        total_interest = 0
        current_date = datetime.now()
        
        schedule += "**Monthly Timeline:**\n"
        for month in range(1, repayment_period + grace_period + 1):
            date = current_date + timedelta(days=30 * month)
            if month <= grace_period:
                schedule += f"- {date.strftime('%B %Y')}: Setup period (No payment required)\n"
            else:
                interest = remaining_balance * monthly_rate
                principal = monthly_payment - interest
                remaining_balance -= principal
                total_interest += interest
                schedule += f"- {date.strftime('%B %Y')}: ${monthly_payment:,.2f}\n"
        
        schedule += f"\n**Total Interest Paid:** ${total_interest:,.2f}"
        logging.debug("Loan repayment schedule calculated.")
        return schedule
    except ValueError:
        return "Please enter valid numbers for the loan calculation."

def create_detailed_financial_projection():
    """
    Creates a detailed 12-month financial projection chart with three scenarios:
    worst-case, expected, and best-case revenue paths.
    """
    months = ['Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'Jan', 'Feb']
    base_revenue = 1000
    worst_case = [base_revenue * (1 + 0.05) ** i for i in range(len(months))]
    expected = [base_revenue * (1 + 0.10) ** i for i in range(len(months))]
    best_case = [base_revenue * (1 + 0.20) ** i for i in range(len(months))]
    
    fig = go.Figure()
    fig.add_trace(go.Scatter(
        x=months, y=worst_case, name='Worst Case',
        line={'color': '#FF6B6B', 'width': 2, 'dash': 'dot'}
    ))
    fig.add_trace(go.Scatter(
        x=months, y=expected, name='Expected',
        line={'color': '#94A3B8', 'width': 3}
    ))
    fig.add_trace(go.Scatter(
        x=months, y=best_case, name='Best Case',
        line={'color': '#2563EB', 'width': 3, 'dash': 'dash'}
    ))
    
    fig.update_layout(
        title={'text': '12-Month Financial Projection', 'font': {'size': 24}},
        xaxis_title='Month',
        yaxis_title='Revenue (USD)',
        plot_bgcolor='white',
        font={'family': 'Arial', 'size': 14},
        legend={'orientation': 'h', 'x': 0.3, 'y': 1.1}
    )
    logging.debug("Detailed financial projection chart created.")
    return fig

def create_project_timeline():
    """
    Creates a timeline chart showing key project milestones.
    """
    milestones = ["Concept", "Prototype", "Beta Launch", "Full Launch", "Growth", "Expansion"]
    dates = ["2025-03-01", "2025-04-15", "2025-06-01", "2025-08-01", "2025-10-01", "2025-12-01"]
    
    fig = go.Figure(data=go.Scatter(
        x=dates, y=list(range(len(milestones))), mode="markers+text",
        text=milestones, textposition="top center", marker=dict(size=12, color="#2563EB")
    ))
    fig.update_layout(
        title="Project Timeline & Milestones",
        xaxis_title="Date",
        yaxis_title="Milestone Stage",
        yaxis=dict(tickvals=list(range(len(milestones))), ticktext=milestones),
        plot_bgcolor='white',
        font={'family': 'Arial', 'size': 14}
    )
    logging.debug("Project timeline chart created.")
    return fig

# =============================================================================
# Helper Functions: Textual Content for Pitch Deck
# =============================================================================
def display_tech_stack():
    """
    Returns a Markdown string detailing the technical stack and tools used.
    """
    tech_info = """
    ### Technical Stack & Tools
    - **Languages:** Python, JavaScript, Solidity, Rust, Go, Swift, C++, HTML
    - **Frameworks:** Next.js, React, Gradio, Langchain, LlamaIndex, StreamLit
    - **AI/ML:** TensorFlow, PyTorch, LangChain, Transformers, Embeddings models, VLM
    - **RAG Systems:** Microsoft Nano Graph RAG, Multimodel RAGs, In-house systems
    - **Development Tools:** VS Code extensions, UNSLOTH, Ollama, TensorBoard, YOLO
    - **Databases:** PostgreSQL (with pgvector), MongoDB, SQL
    - **Cloud Infrastructure:** AWS, Huggingface Spaces, Google Colab (free T100s)
    """
    return tech_info

def display_business_plan():
    """
    Returns a Markdown string with a comprehensive business plan.
    """
    business_plan = """
    ### Comprehensive Business Plan
    #### Executive Summary
    Our mission is to revolutionize AI with secure, innovative solutions based on Retrieval Augmented Generation (RAG).
    
    #### Company Description
    **Sletcher Systems** designs systems that transform free open source tools into scalable, inhouse AI solutions.
    We build proprietary RAG systems to sell alongside open source versions.
    
    #### Market Analysis
    - **Local Focus:** Tailored for unique regulatory landscapes.
    - **Growth Opportunity:** Huge potential in both enterprise and consumer markets.
    
    #### Product Offerings
    - **AI Assistants:** 24/7, offline, and secure.
    - **SaaS Platforms:** End-to-end solutions for image/document processing.
    - **Developer Tools:** Custom VS Code extensions.
    - **Advertising Agents:** Automated marketing and advertising solutions.
    
    #### Financial Projections
    - **Initial Investment:** $3,000 for GPU upgrade.
    - **Break-even:** Expected within 4-6 months.
    - **ROI:** 5x revenue increase potential.
    
    #### Marketing & Sales Strategy
    - Digital outreach, strategic partnerships, and local tech events.
    
    #### Future Vision
    - Scaling operations for global impact.
    """
    return business_plan

def display_future_plans():
    """
    Returns a Markdown string detailing future plans and vision.
    """
    future_plans = """
    ### Future Plans & Vision
    - **Expand Inhouse AI Operations:** Run continuous 24/7 systems.
    - **Launch New SaaS Products:** Including advanced image processing and marketing automation.
    - **Develop Advanced Developer Tools:** Enhance productivity with custom integrations.
    - **Scale the Business:** Enter new markets with enterprise-grade solutions.
    - **Invest in R&D:** Establish a small research lab for continuous innovation.
    """
    return future_plans

def display_personal_note():
    """
    Returns a heartfelt personal note.
    """
    personal_note = """
    ### A Personal Note to Dad
    Dad, you've always believed in me. Despite being a part-time teacher with almost nothing to my name,
    I have relentlessly pursued my passion for tech. Every day, I work on building innovative AI solutions,
    even if it means scraping by on every paycheck.
    
    With your support, I can:
    - Run my own inhouse AI system 24/7.
    - Develop websites, automate marketing, and launch profitable SaaS products.
    - Create both proprietary and open source RAG systems.
    - Operate a marketing advertising firm with automated agents.
    
    This GPU upgrade is not just a hardware upgrade—it’s the key to turning my passion into a sustainable business
    that repays your investment and makes you proud.
    """
    return personal_note

def display_pitch_deck_overview():
    """
    Returns a Markdown string that integrates key pitch deck points.
    """
    pitch_deck = """
    ## Complete Pitch Deck Overview
    
    ### Company Purpose
    Sletcher Systems designs and deploys advanced AI systems that transform free open source tools into scalable, inhouse solutions.
    
    ### Problem
    Many businesses suffer from inefficient, fragmented AI solutions that require constant connectivity and manual intervention.
    Today, customers rely on piecemeal, expensive solutions that don’t integrate well.
    
    ### Solution
    We offer a comprehensive suite of AI products—including proprietary and open source RAG systems—that operate offline
    and continuously. Our solutions include:
    - **Proprietary RAG Systems:** Robust, scalable solutions for enterprise needs.
    - **Open Source RAG Systems:** Community-driven and cost-effective.
    - **Automated Marketing Agents:** Running 24/7 to drive targeted advertising.
    - **Image/Document Processing Suites:** Advanced tools for scanning, labeling, and data extraction.
    
    ### Why Now
    The rapid evolution of AI technology and open source tools, combined with increased demand for offline, scalable systems,
    makes this the perfect moment to innovate. Recent trends in cloud computing and edge AI have paved the way for our solution.
    
    ### Market Size
    Our target customers range from SMEs to large enterprises. We estimate:
    - **TAM (Total Addressable Market):** ~$10 billion
    - **SAM (Serviceable Available Market):** ~$2 billion
    - **SOM (Serviceable Obtainable Market):** ~$500 million
    
    ### Competition
    Competitors include established AI solution providers and emerging startups.
    Our competitive advantages are:
    - Unique offline operational capability
    - Proprietary RAG technology with 24/7 uptime
    - Cost-effective, scalable solutions
    
    ### Product
    **Product Line-Up:**
    - **Proprietary RAG System:** Robust and scalable, built for enterprise needs.
    - **Open Source RAG System:** Affordable and community-driven.
    - **Advertising & Marketing Agents:** Automated agents for continuous revenue generation.
    - **Image/Document Processing Suite:** End-to-end solution for data extraction.
    
    **Development Roadmap:**
    - Immediate: Launch basic versions and run pilot projects.
    - Near-term: Integrate additional features and optimize performance.
    - Long-term: Expand product offerings and enter new markets.
    
    ### Business Model
    We operate on a multi-stream revenue model:
    - **Subscription Revenue:** Recurring fees from enterprise contracts.
    - **Project-Based Income:** Custom website and software development.
    - **Advertising Revenue:** Income from automated marketing agents.
    
    Pricing is competitive, with average account sizes ranging from $500 to $10,000 per month.
    Our sales and distribution model leverages digital outreach, strategic partnerships, and direct sales.
    
    ### Team
    Founded by Wayne Sletcher—a resilient, self-taught coder and part-time teacher—the team includes:
    - Expert developers and AI specialists.
    - Strategic advisors with deep industry experience.
    
    ### Financials
    Our projections indicate:
    - Break-even within 4-6 months.
    - Potential ROI of 5x with the GPU upgrade.
    Detailed P&L, balance sheet, cash flow forecasts, and cap table data are available for serious investors.
    
    ### The Deal
    We seek an initial investment of $3,000 for a GPU upgrade that will power our 24/7 inhouse AI system,
    driving growth and ensuring sustainable revenue to repay the investment.
    """
    return pitch_deck

# =============================================================================
# End of Helper Functions
# =============================================================================

# -----------------------------------------------------------------------------
# Construct the Gradio Interface with Multiple Tabs
# -----------------------------------------------------------------------------
with gr.Blocks(theme=gr.themes.Soft(), css="""
    .header {
        background: linear-gradient(90deg, #1E40AF, #3B82F6);
        padding: 20px;
        text-align: center;
        color: white;
        font-family: 'Arial', sans-serif;
    }
    .header h1 {
        margin: 0;
        font-size: 36px;
    }
    .header p {
        margin: 3px 0 0;
        font-size: 18px;
    }
    .persistent-banner {
        position: fixed;
        top: 0;
        width: 100%;
        background: #2563EB;
        color: white;
        text-align: center;
        padding: 10px;
        font-size: 16px;
        z-index: 9999;
    }
    .content-wrapper {
        padding-top: 80px;
    }
""") as demo:
    # -----------------------------------------------------------------------------
    # Persistent Banner at the Top: Ko‑fi + Contact Info
    # -----------------------------------------------------------------------------
    gr.HTML("""
    <div class="persistent-banner">
        Support my journey on <a href="https://ko-fi.com/waynesletcher" target="_blank" style="color: white; text-decoration: underline;">Ko-fi</a>
        | Contact: <a href="mailto:[email protected]" style="color: white; text-decoration: underline;">[email protected]</a>
        | <a href="https://www.linkedin.com/in/waynesletcher/" target="_blank" style="color: white; text-decoration: underline;">LinkedIn</a>
        | <a href="https://www.sletchersystems.com/" target="_blank" style="color: white; text-decoration: underline;">Website</a>
    </div>
    """)
    
    # -----------------------------------------------------------------------------
    # Header Section
    # -----------------------------------------------------------------------------
    gr.HTML("""
        <div class="header">
            <h1>Dad, I Would Like Your Help.</h1>
            <p>From Teaching to Tech: Help Me Level Up My AI Business</p>
        </div>
    """)
    
    with gr.Column(elem_classes=["content-wrapper"]):
        with gr.Tabs():
            # -------------------------------------------------------------------------
            # Tab 1: My Story
            # -------------------------------------------------------------------------
            with gr.TabItem("👋 My Story"):
                gr.Markdown("""
                    ### Hey Dad,
                    
                    I've pushed through every obstacle—from a challenging childhood to graduating as a chef, to solo traveling China - repaying my student loans, and then traveling south east asia as a backpacker, working as lecturer and now a part-time online teacher—
                    all while teaching myself to code and build AI projects. I built a full AI system on just 2GB VRAM,
                    but I know I can do so much more with the right hardware. I don't even clear 80$ a week sometimes teaching, I go without food to pay for things like claude or GPT, yes, I have yet to make money through code, but I will get there. Promise.
                    
                    With a GPU upgrade, I can run my own inhouse AI system 24/7, create websites, automate marketing,
                    and launch new SaaS products that generate real revenue. I can not do more to prove this is my purpose. 
                """)
                gr.Plot(value=create_performance_comparison())
                gr.Markdown("""
                    **Key Insight:** My current hardware is limiting my potential. This upgrade is essential for growth.
                """)
            
            # -------------------------------------------------------------------------
            # Tab 2: Technology & Vision
            # -------------------------------------------------------------------------
            with gr.TabItem("💻 Tech & Vision"):
                with gr.Row():
                    with gr.Column():
                        gr.Markdown("""
                            ### Current Capabilities
                            - Local AI assistants running on minimal hardware.
                            - Basic image processing and simple automation tools.
                            - Self-taught skills and relentless determination.
                            
                            ### With a GPU Upgrade
                            - 24/7 inhouse AI system operation.
                            - Advanced model training and fine-tuning.
                            - Ability to run multiple projects simultaneously.
                            - Enterprise-grade solutions and scalability.
                        """)
                    with gr.Column():
                        gr.Markdown(display_tech_stack())
                        gr.Markdown("""
                            **Projects in Development:**
                            1. **AI Assistants Platform:** Custom solutions for businesses.
                            2. **Developer Tools:** VS Code extensions to enhance productivity.
                            3. **Image Processing Suite:** Automated scanning and labeling.
                            4. **Marketing Automation:** 24/7 advertising agents and campaign optimization.
                        """)
                gr.Plot(value=create_roi_projection())
            
            # -------------------------------------------------------------------------
            # Tab 3: Investment & Returns
            # -------------------------------------------------------------------------
            with gr.TabItem("💰 ROI"):
                gr.Markdown("""
                    ### Investment Opportunity
                    I need an investment of $2,000 for a GPU upgrade that will allow my inhouse AI system to operate continuously.
                    
                    **Expected Returns:**
                    - Break-even within 4-6 months.
                    - 5x revenue increase potential.
                    - New income streams through website development, marketing automation, and SaaS solutions.
                """)
                gr.Plot(value=create_roi_projection())
                gr.Plot(value=create_earnings_history())
                with gr.Row():
                    loan_amount = gr.Number(label="Investment Amount ($)", value=3000)
                    interest_rate = gr.Slider(label="Interest Rate (%)", value=5, minimum=1, maximum=10)
                calculate_button = gr.Button("Calculate Repayment Plan")
                schedule_output = gr.Textbox(label="Repayment Schedule", lines=15)
                calculate_button.click(calculate_loan_schedule, inputs=[loan_amount, interest_rate], outputs=schedule_output)
                gr.Markdown(display_future_plans())
            
            # -------------------------------------------------------------------------
            # Tab 4: Complete Pitch Deck
            # -------------------------------------------------------------------------
            with gr.TabItem("📊 Complete Pitch Deck"):
                gr.Markdown(display_pitch_deck_overview())
            
            # -------------------------------------------------------------------------
            # Tab 5: 🤖 AI Agents
            # -------------------------------------------------------------------------
            with gr.TabItem("🤖 AI Agents"):
                gr.Markdown("""
                    ### AI Agent Tools
                    Use these tools to generate summaries, action plans, and research insights
                    using our in-house Hugging Face models.
                """)
                with gr.Row():
                    with gr.Column():
                        gr.Markdown("#### Summarizer")
                        summarizer_input = gr.Textbox(label="Enter text to summarize", placeholder="Paste text here...", lines=5)
                        summarizer_output = gr.Textbox(label="Summary", lines=5)
                        summarizer_button = gr.Button("Generate Summary")
                        summarizer_button.click(report_agent, inputs=[summarizer_input], outputs=[summarizer_output])
                    with gr.Column():
                        gr.Markdown("#### Planner")
                        planner_input = gr.Textbox(label="Enter goal or task", placeholder="Describe your goal...", lines=5)
                        planner_output = gr.Textbox(label="Action Plan", lines=5)
                        planner_button = gr.Button("Generate Plan")
                        planner_button.click(planning_agent, inputs=[planner_input], outputs=[planner_output])
                with gr.Row():
                    with gr.Column():
                        gr.Markdown("#### Research Agent")
                        research_input = gr.Textbox(label="Enter research query", placeholder="Ask your research question...", lines=5)
                        research_output = gr.Textbox(label="Research Insights", lines=5)
                        research_button = gr.Button("Generate Research")
                        research_button.click(research_agent, inputs=[research_input], outputs=[research_output])
            
            # -------------------------------------------------------------------------
            # Tab 6: Project Timeline & Milestones
            # -------------------------------------------------------------------------
            with gr.TabItem("📅 Timeline & Milestones"):
                gr.Markdown("""
                    ### Project Timeline
                    Below is a timeline outlining the major milestones for scaling my AI operations:
                """)
                gr.Plot(value=create_project_timeline())
                gr.Markdown("""
                    **Milestones:**
                    - **Concept Phase:** Finalize ideas and prototypes.
                    - **Development Phase:** Build and test inhouse AI systems.
                    - **Beta Launch:** Roll out initial products.
                    - **Full Launch:** Commercial deployment.
                    - **Growth Phase:** Scale operations and revenue.
                """)
            
            # -------------------------------------------------------------------------
            # Tab 7: From the Heart & Contact
            # -------------------------------------------------------------------------
            with gr.TabItem("💝 From the Heart"):
                gr.Markdown(display_personal_note())
                gr.Markdown("""
                    **Contact Information:**
                    - **Email:** <a href="mailto:[email protected]" style="color: #2563EB;">[email protected]</a>
                    - **LinkedIn:** <a href="https://www.linkedin.com/in/waynesletcher/" target="_blank" style="color: #2563EB;">Wayne Sletcher</a>
                    - **Website:** <a href="https://www.sletchersystems.com/" target="_blank" style="color: #2563EB;">sletchersystems.com</a>
                """)
            
            # -------------------------------------------------------------------------
            # Tab 8: SaaS Solutions, Systems & Revenue Model
            # -------------------------------------------------------------------------
            with gr.TabItem("🖥️ Products"):
                gr.Markdown("""
                    ### SaaS & Systems Offerings
                    **What Sletchersystems Designs:**
                    - **RAG-Based Systems:** I will build both a proprietary RAG system to sell and offer an open source version.
                    - **Marketing & Advertising Agents:** Automated agents that run 24/7 to drive targeted advertising.
                    - **Image & Document Processing:** Automated scanning, labeling, and processing solutions for data extraction.
                    
                    **Revenue Streams:**
                    - Subscription revenue from enterprise contracts.
                    - Project-based income from website and software development.
                    - Advertising revenue from continuously running marketing agents.
                """)
                gr.Markdown(display_tech_stack())
                gr.Markdown("""
                    **Revenue Model:**
                    With a GPU upgrade, I can transform free open source tools into a full-scale inhouse AI system.
                    My agents will run a 24/7 marketing advertising firm, and my image/document processing solutions
                    will create a steady revenue stream to repay your investment.
                """)

demo.launch(share=True)