MrInvincible96 commited on
Commit
a2e03fe
·
verified ·
1 Parent(s): f837931

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +141 -134
app.py CHANGED
@@ -5,222 +5,232 @@ import gradio as gr
5
  CUSTOM_CSS = """
6
  body {
7
  background:
8
- radial-gradient(circle at top left, rgba(230, 244, 234, 0.9), transparent 28%),
9
- radial-gradient(circle at bottom right, rgba(255, 232, 214, 0.85), transparent 30%),
10
- linear-gradient(180deg, #f6f8f4 0%, #eef3ee 100%);
11
  }
12
 
13
  .gradio-container {
14
  max-width: 1280px !important;
15
- padding-top: 24px !important;
16
  padding-bottom: 36px !important;
17
- font-family: "Segoe UI", "Helvetica Neue", sans-serif !important;
 
18
  }
19
 
20
  .hero-shell {
21
- border-radius: 28px;
 
22
  overflow: hidden;
23
- background: linear-gradient(135deg, #103b2d 0%, #1e5c47 55%, #f1c46b 140%);
24
- box-shadow: 0 24px 60px rgba(18, 54, 41, 0.16);
25
- margin-bottom: 22px;
26
  }
27
 
28
  .hero-inner {
29
- padding: 38px 36px 30px 36px;
30
  color: white;
31
  }
32
 
33
  .eyebrow {
34
  display: inline-block;
35
- font-size: 0.82rem;
36
  font-weight: 700;
37
- letter-spacing: 0.08em;
38
  text-transform: uppercase;
39
- padding: 8px 12px;
40
- border-radius: 999px;
41
- background: rgba(255, 255, 255, 0.14);
42
- margin-bottom: 18px;
43
  }
44
 
45
  .hero-title {
46
- font-size: 3rem;
47
- line-height: 1.05;
 
48
  font-weight: 800;
49
- margin: 0 0 14px 0;
50
- letter-spacing: -0.03em;
51
  }
52
 
53
  .hero-subtitle {
54
  max-width: 860px;
55
- font-size: 1.08rem;
 
56
  line-height: 1.75;
57
- color: rgba(255, 255, 255, 0.92);
58
- margin-bottom: 22px;
59
  }
60
 
61
- .hero-grid {
62
  display: grid;
63
  grid-template-columns: repeat(4, minmax(0, 1fr));
64
- gap: 12px;
 
 
 
 
65
  }
66
 
67
  .hero-stat {
68
- background: rgba(255, 255, 255, 0.12);
69
- border: 1px solid rgba(255, 255, 255, 0.14);
70
- border-radius: 18px;
71
  padding: 14px 16px;
72
- backdrop-filter: blur(6px);
73
  }
74
 
75
  .hero-stat strong {
76
  display: block;
77
- font-size: 1rem;
78
  margin-bottom: 4px;
79
  }
80
 
81
  .hero-stat span {
82
- font-size: 0.9rem;
83
- color: rgba(255, 255, 255, 0.85);
 
84
  }
85
 
86
  .panel {
87
- background: rgba(255, 255, 255, 0.84);
88
- border: 1px solid rgba(27, 71, 54, 0.08);
89
- border-radius: 24px;
90
- box-shadow: 0 14px 40px rgba(40, 61, 51, 0.08);
91
  overflow: hidden;
92
  }
93
 
94
  .panel-head {
95
- padding: 22px 24px 10px 24px;
 
 
96
  }
97
 
98
  .panel-title {
99
- font-size: 1.35rem;
100
- font-weight: 800;
101
- color: #153f31;
102
  margin: 0 0 6px 0;
 
 
 
103
  }
104
 
105
  .panel-copy {
106
- color: #52645d;
107
- font-size: 0.98rem;
108
- line-height: 1.6;
109
  margin: 0;
 
 
 
110
  }
111
 
112
  .panel-body {
113
- padding: 0 24px 24px 24px;
114
  }
115
 
116
  .metric-strip {
117
  display: grid;
118
  grid-template-columns: repeat(3, minmax(0, 1fr));
119
  gap: 12px;
120
- margin-bottom: 18px;
121
  }
122
 
123
  .metric-card {
124
- background: linear-gradient(180deg, #ffffff 0%, #f6fbf7 100%);
125
- border: 1px solid #dde9e0;
126
- border-radius: 18px;
127
- padding: 16px;
 
128
  }
129
 
130
  .metric-card strong {
131
  display: block;
132
- color: #1a4d3c;
133
- font-size: 1.25rem;
134
  margin-bottom: 4px;
135
  }
136
 
137
  .metric-card span {
138
- color: #61746c;
139
- font-size: 0.92rem;
 
140
  }
141
 
142
  textarea {
143
- background: #fcfdfb !important;
144
- border: 1px solid #dbe7de !important;
145
- border-radius: 18px !important;
146
- font-size: 1rem !important;
147
- color: #20332b !important;
148
  box-shadow: none !important;
149
  }
150
 
151
  textarea:focus {
152
- border: 1px solid #2a7a5c !important;
153
- box-shadow: 0 0 0 3px rgba(42, 122, 92, 0.12) !important;
154
  }
155
 
156
  button.primary {
157
- background: linear-gradient(135deg, #16543f 0%, #247458 100%) !important;
158
  color: white !important;
159
- border: none !important;
160
- border-radius: 16px !important;
161
- min-height: 48px !important;
162
  font-weight: 700 !important;
163
  }
164
 
 
 
 
 
165
  button.secondary {
166
  background: white !important;
167
- color: #1b4c3c !important;
168
- border: 1px solid #d4e2d8 !important;
169
- border-radius: 16px !important;
170
- min-height: 48px !important;
171
  font-weight: 700 !important;
172
  }
173
 
174
- .tabs {
175
- border: none !important;
176
- }
177
-
178
  .tab-nav {
179
  gap: 8px !important;
180
- padding: 0 24px !important;
 
181
  }
182
 
183
  .tab-nav button {
184
  border-radius: 999px !important;
185
- border: 1px solid #d7e3da !important;
186
- background: white !important;
187
- color: #355347 !important;
188
  font-weight: 700 !important;
189
  }
190
 
191
  .tab-nav button.selected {
192
- background: linear-gradient(135deg, #e8f5ed 0%, #f7fbf8 100%) !important;
193
- color: #174735 !important;
194
- border-color: #b7d8c3 !important;
195
  }
196
 
197
  .prose, .prose * {
198
- color: #1d2f28 !important;
199
- line-height: 1.7 !important;
200
  }
201
 
202
  .prose h1, .prose h2, .prose h3 {
203
- color: #163f31 !important;
204
  font-weight: 800 !important;
205
  }
206
 
207
  .footer-banner {
208
- margin-top: 18px;
209
- background: linear-gradient(135deg, #fffdf8 0%, #eef7f1 100%);
210
- border: 1px solid #d9e6dd;
211
- border-radius: 22px;
212
- padding: 18px 22px;
213
- color: #355247;
214
- font-size: 0.96rem;
215
- line-height: 1.6;
 
 
 
 
 
216
  }
217
 
218
  @media (max-width: 900px) {
219
  .hero-title {
220
- font-size: 2.2rem;
221
  }
222
 
223
- .hero-grid,
224
  .metric-strip {
225
  grid-template-columns: 1fr;
226
  }
@@ -575,32 +585,32 @@ def generate_documents(notes):
575
  return brd, stories, before_after
576
 
577
 
578
- with gr.Blocks(css=CUSTOM_CSS, theme=gr.themes.Soft()) as demo:
579
  gr.HTML("""
580
  <div class="hero-shell">
581
  <div class="hero-inner">
582
- <div class="eyebrow">Business Analyst Portfolio Project</div>
583
  <h1 class="hero-title">Agentic BA</h1>
584
  <p class="hero-subtitle">
585
- Transform rough stakeholder notes into a structured Business Requirements Document,
586
- polished BDD-style user stories, and a recruiter-friendly before-vs-after showcase.
587
  </p>
588
- <div class="hero-grid">
589
  <div class="hero-stat">
590
- <strong>Structured Output</strong>
591
- <span>Turns raw notes into clean BA deliverables</span>
592
  </div>
593
  <div class="hero-stat">
594
- <strong>100% Free</strong>
595
- <span>No paid APIs or subscriptions required</span>
596
  </div>
597
  <div class="hero-stat">
598
- <strong>Public Demo</strong>
599
- <span>Easy to share with recruiters and hiring teams</span>
600
  </div>
601
  <div class="hero-stat">
602
- <strong>Portfolio Ready</strong>
603
- <span>Shows BA thinking and workflow automation</span>
604
  </div>
605
  </div>
606
  </div>
@@ -614,28 +624,25 @@ with gr.Blocks(css=CUSTOM_CSS, theme=gr.themes.Soft()) as demo:
614
  <div class="panel-head">
615
  <h2 class="panel-title">Input Workspace</h2>
616
  <p class="panel-copy">
617
- Paste stakeholder notes, interview summaries, or rough business observations.
618
- The app will turn them into cleaner BA documentation.
619
  </p>
620
  </div>
621
  <div class="panel-body">
622
- """)
623
-
624
- gr.HTML("""
625
- <div class="metric-strip">
626
- <div class="metric-card">
627
- <strong>BRD</strong>
628
- <span>Formal structure from messy notes</span>
629
- </div>
630
- <div class="metric-card">
631
- <strong>BDD Stories</strong>
632
- <span>User-focused requirements output</span>
633
- </div>
634
- <div class="metric-card">
635
- <strong>Before/After</strong>
636
- <span>Clear showcase for LinkedIn and interviews</span>
637
- </div>
638
- </div>
639
  """)
640
 
641
  notes_input = gr.Textbox(
@@ -645,8 +652,8 @@ with gr.Blocks(css=CUSTOM_CSS, theme=gr.themes.Soft()) as demo:
645
  )
646
 
647
  with gr.Row():
648
- generate_btn = gr.Button("Generate BA Documents", variant="primary")
649
- clear_btn = gr.Button("Reset", variant="secondary")
650
 
651
  gr.Examples(
652
  examples=[
@@ -655,7 +662,7 @@ with gr.Blocks(css=CUSTOM_CSS, theme=gr.themes.Soft()) as demo:
655
  ["Users find login confusing. Stakeholders want optional sign-in where possible, a simpler user flow, faster completion, and fewer helpdesk calls."]
656
  ],
657
  inputs=notes_input,
658
- label="Try Sample Inputs"
659
  )
660
 
661
  gr.HTML("</div></div>")
@@ -664,16 +671,16 @@ with gr.Blocks(css=CUSTOM_CSS, theme=gr.themes.Soft()) as demo:
664
  gr.HTML("""
665
  <div class="panel">
666
  <div class="panel-head">
667
- <h2 class="panel-title">Recruiter View</h2>
668
  <p class="panel-copy">
669
- Review the same notes as a business-ready output. This layout is designed to show
670
- documentation thinking, structure, and portfolio value quickly.
671
  </p>
672
  </div>
673
  """)
674
 
675
  with gr.Tabs():
676
- with gr.Tab("Business Requirements Document"):
677
  brd_output = gr.Markdown()
678
  with gr.Tab("BDD User Stories"):
679
  stories_output = gr.Markdown()
@@ -684,9 +691,9 @@ with gr.Blocks(css=CUSTOM_CSS, theme=gr.themes.Soft()) as demo:
684
 
685
  gr.HTML("""
686
  <div class="footer-banner">
687
- <strong>Why this project stands out:</strong> Agentic BA shows how unstructured business input
688
- can be converted into formal project documentation through workflow automation. It is built to
689
- be easy to demo, easy to explain, and easy to share on LinkedIn or in job applications.
690
  </div>
691
  """)
692
 
 
5
  CUSTOM_CSS = """
6
  body {
7
  background:
8
+ linear-gradient(180deg, #f4f6f8 0%, #edf1f5 100%);
 
 
9
  }
10
 
11
  .gradio-container {
12
  max-width: 1280px !important;
13
+ padding-top: 20px !important;
14
  padding-bottom: 36px !important;
15
+ font-family: "Aptos", "Segoe UI", "Helvetica Neue", sans-serif !important;
16
+ color: #142433;
17
  }
18
 
19
  .hero-shell {
20
+ background: linear-gradient(135deg, #0f2740 0%, #173a5c 100%);
21
+ border-radius: 10px;
22
  overflow: hidden;
23
+ box-shadow: 0 18px 40px rgba(18, 36, 53, 0.16);
24
+ margin-bottom: 18px;
25
+ border: 1px solid rgba(255, 255, 255, 0.08);
26
  }
27
 
28
  .hero-inner {
29
+ padding: 30px 34px;
30
  color: white;
31
  }
32
 
33
  .eyebrow {
34
  display: inline-block;
35
+ font-size: 0.78rem;
36
  font-weight: 700;
 
37
  text-transform: uppercase;
38
+ letter-spacing: 0.08em;
39
+ color: #d7e6f5;
40
+ margin-bottom: 12px;
 
41
  }
42
 
43
  .hero-title {
44
+ margin: 0 0 12px 0;
45
+ font-size: 2.5rem;
46
+ line-height: 1.08;
47
  font-weight: 800;
48
+ letter-spacing: -0.02em;
 
49
  }
50
 
51
  .hero-subtitle {
52
  max-width: 860px;
53
+ margin: 0;
54
+ font-size: 1.02rem;
55
  line-height: 1.75;
56
+ color: #e8f0f7;
 
57
  }
58
 
59
+ .hero-bar {
60
  display: grid;
61
  grid-template-columns: repeat(4, minmax(0, 1fr));
62
+ gap: 1px;
63
+ margin-top: 22px;
64
+ background: rgba(255, 255, 255, 0.12);
65
+ border-radius: 8px;
66
+ overflow: hidden;
67
  }
68
 
69
  .hero-stat {
70
+ background: rgba(255, 255, 255, 0.08);
 
 
71
  padding: 14px 16px;
 
72
  }
73
 
74
  .hero-stat strong {
75
  display: block;
76
+ font-size: 0.92rem;
77
  margin-bottom: 4px;
78
  }
79
 
80
  .hero-stat span {
81
+ font-size: 0.84rem;
82
+ color: #d6e4f1;
83
+ line-height: 1.45;
84
  }
85
 
86
  .panel {
87
+ background: #ffffff;
88
+ border: 1px solid #d7dde5;
89
+ border-radius: 10px;
90
+ box-shadow: 0 8px 20px rgba(31, 47, 61, 0.06);
91
  overflow: hidden;
92
  }
93
 
94
  .panel-head {
95
+ padding: 20px 22px 14px 22px;
96
+ border-bottom: 1px solid #e3e8ee;
97
+ background: linear-gradient(180deg, #fbfcfd 0%, #f5f8fb 100%);
98
  }
99
 
100
  .panel-title {
 
 
 
101
  margin: 0 0 6px 0;
102
+ font-size: 1.2rem;
103
+ font-weight: 800;
104
+ color: #16324a;
105
  }
106
 
107
  .panel-copy {
 
 
 
108
  margin: 0;
109
+ color: #536575;
110
+ font-size: 0.95rem;
111
+ line-height: 1.6;
112
  }
113
 
114
  .panel-body {
115
+ padding: 20px 22px 22px 22px;
116
  }
117
 
118
  .metric-strip {
119
  display: grid;
120
  grid-template-columns: repeat(3, minmax(0, 1fr));
121
  gap: 12px;
122
+ margin-bottom: 16px;
123
  }
124
 
125
  .metric-card {
126
+ background: #f8fafc;
127
+ border: 1px solid #dfe5eb;
128
+ border-left: 4px solid #204d74;
129
+ border-radius: 8px;
130
+ padding: 14px 14px 12px 14px;
131
  }
132
 
133
  .metric-card strong {
134
  display: block;
135
+ color: #173954;
136
+ font-size: 1rem;
137
  margin-bottom: 4px;
138
  }
139
 
140
  .metric-card span {
141
+ color: #5b6d7b;
142
+ font-size: 0.88rem;
143
+ line-height: 1.45;
144
  }
145
 
146
  textarea {
147
+ background: #ffffff !important;
148
+ border: 1px solid #ccd5de !important;
149
+ border-radius: 8px !important;
150
+ font-size: 0.98rem !important;
151
+ color: #1a2b38 !important;
152
  box-shadow: none !important;
153
  }
154
 
155
  textarea:focus {
156
+ border: 1px solid #204d74 !important;
157
+ box-shadow: 0 0 0 3px rgba(32, 77, 116, 0.12) !important;
158
  }
159
 
160
  button.primary {
161
+ background: #163a59 !important;
162
  color: white !important;
163
+ border: 1px solid #163a59 !important;
164
+ border-radius: 8px !important;
165
+ min-height: 46px !important;
166
  font-weight: 700 !important;
167
  }
168
 
169
+ button.primary:hover {
170
+ background: #1d4b73 !important;
171
+ }
172
+
173
  button.secondary {
174
  background: white !important;
175
+ color: #173954 !important;
176
+ border: 1px solid #ccd5de !important;
177
+ border-radius: 8px !important;
178
+ min-height: 46px !important;
179
  font-weight: 700 !important;
180
  }
181
 
 
 
 
 
182
  .tab-nav {
183
  gap: 8px !important;
184
+ padding: 14px 22px 0 22px !important;
185
+ background: white !important;
186
  }
187
 
188
  .tab-nav button {
189
  border-radius: 999px !important;
190
+ border: 1px solid #d5dce4 !important;
191
+ background: #f7f9fb !important;
192
+ color: #3d5568 !important;
193
  font-weight: 700 !important;
194
  }
195
 
196
  .tab-nav button.selected {
197
+ background: #163a59 !important;
198
+ color: white !important;
199
+ border-color: #163a59 !important;
200
  }
201
 
202
  .prose, .prose * {
203
+ color: #1e2f3d !important;
204
+ line-height: 1.72 !important;
205
  }
206
 
207
  .prose h1, .prose h2, .prose h3 {
208
+ color: #16324a !important;
209
  font-weight: 800 !important;
210
  }
211
 
212
  .footer-banner {
213
+ margin-top: 16px;
214
+ background: #ffffff;
215
+ border: 1px solid #d8dfe6;
216
+ border-radius: 10px;
217
+ padding: 16px 20px;
218
+ color: #49606f;
219
+ font-size: 0.94rem;
220
+ line-height: 1.65;
221
+ box-shadow: 0 8px 18px rgba(31, 47, 61, 0.05);
222
+ }
223
+
224
+ .footer-banner strong {
225
+ color: #16324a;
226
  }
227
 
228
  @media (max-width: 900px) {
229
  .hero-title {
230
+ font-size: 2rem;
231
  }
232
 
233
+ .hero-bar,
234
  .metric-strip {
235
  grid-template-columns: 1fr;
236
  }
 
585
  return brd, stories, before_after
586
 
587
 
588
+ with gr.Blocks(css=CUSTOM_CSS, theme=gr.themes.Base()) as demo:
589
  gr.HTML("""
590
  <div class="hero-shell">
591
  <div class="hero-inner">
592
+ <div class="eyebrow">Strategy • Requirements • Workflow Automation</div>
593
  <h1 class="hero-title">Agentic BA</h1>
594
  <p class="hero-subtitle">
595
+ A Business Analyst portfolio solution that converts unstructured stakeholder notes into
596
+ structured BRDs, BDD-style user stories, and a clear before-versus-after documentation view.
597
  </p>
598
+ <div class="hero-bar">
599
  <div class="hero-stat">
600
+ <strong>Structured Documentation</strong>
601
+ <span>Converts rough notes into formal requirement outputs.</span>
602
  </div>
603
  <div class="hero-stat">
604
+ <strong>Public Portfolio Demo</strong>
605
+ <span>Built to share with recruiters and hiring teams.</span>
606
  </div>
607
  <div class="hero-stat">
608
+ <strong>100% Free Stack</strong>
609
+ <span>No paid APIs, subscriptions, or hidden usage costs.</span>
610
  </div>
611
  <div class="hero-stat">
612
+ <strong>BA Lifecycle Focus</strong>
613
+ <span>Highlights analysis, structuring, and requirement thinking.</span>
614
  </div>
615
  </div>
616
  </div>
 
624
  <div class="panel-head">
625
  <h2 class="panel-title">Input Workspace</h2>
626
  <p class="panel-copy">
627
+ Provide stakeholder notes, workshop summaries, or interview observations.
628
+ The application reorganizes them into clearer business deliverables.
629
  </p>
630
  </div>
631
  <div class="panel-body">
632
+ <div class="metric-strip">
633
+ <div class="metric-card">
634
+ <strong>BRD Output</strong>
635
+ <span>Formal business requirement structure</span>
636
+ </div>
637
+ <div class="metric-card">
638
+ <strong>BDD Stories</strong>
639
+ <span>User-centered requirement framing</span>
640
+ </div>
641
+ <div class="metric-card">
642
+ <strong>Showcase View</strong>
643
+ <span>Before-and-after transformation for interviews</span>
644
+ </div>
645
+ </div>
 
 
 
646
  """)
647
 
648
  notes_input = gr.Textbox(
 
652
  )
653
 
654
  with gr.Row():
655
+ generate_btn = gr.Button("Generate Deliverables", variant="primary")
656
+ clear_btn = gr.Button("Clear Input", variant="secondary")
657
 
658
  gr.Examples(
659
  examples=[
 
662
  ["Users find login confusing. Stakeholders want optional sign-in where possible, a simpler user flow, faster completion, and fewer helpdesk calls."]
663
  ],
664
  inputs=notes_input,
665
+ label="Sample Business Scenarios"
666
  )
667
 
668
  gr.HTML("</div></div>")
 
671
  gr.HTML("""
672
  <div class="panel">
673
  <div class="panel-head">
674
+ <h2 class="panel-title">Output Review</h2>
675
  <p class="panel-copy">
676
+ Review the generated documentation in a format designed for portfolio presentation
677
+ and rapid recruiter understanding.
678
  </p>
679
  </div>
680
  """)
681
 
682
  with gr.Tabs():
683
+ with gr.Tab("BRD"):
684
  brd_output = gr.Markdown()
685
  with gr.Tab("BDD User Stories"):
686
  stories_output = gr.Markdown()
 
691
 
692
  gr.HTML("""
693
  <div class="footer-banner">
694
+ <strong>Recruiter takeaway:</strong> This project demonstrates how a Business Analyst can apply
695
+ structured automation thinking to convert unclear stakeholder input into clearer, more consistent,
696
+ and more presentation-ready requirement documentation.
697
  </div>
698
  """)
699