GuglielmoTor commited on
Commit
911be30
Β·
verified Β·
1 Parent(s): 1db6477

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -32
app.py CHANGED
@@ -30,7 +30,7 @@ from ui.ui_generators import (
30
  )
31
 
32
  #ui import
33
- from ui.config import custom_css, custom_theme
34
 
35
  # NEW: Import the new OKR UI functions
36
  from ui.okr_ui_generator import create_enhanced_okr_tab, format_okrs_for_enhanced_display, get_initial_okr_display
@@ -132,16 +132,19 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="sky"),
132
 
133
  # --- UI LAYOUT ---
134
  # --- ENHANCED UI HEADER ---
135
- with gr.Row():
136
- with gr.Column():
137
- gr.HTML("""
138
- <div class="main-title">
139
- πŸš€ LinkedIn Organization Dashboard
140
- </div>
141
- <div class="main-subtitle">
142
- Advanced Analytics & AI-Powered Insights for Your LinkedIn Performance
143
- </div>
144
- """)
 
 
 
145
 
146
  url_user_token_display = gr.Textbox(label="User Token (Hidden)", interactive=False, visible=False)
147
  org_urn_display = gr.Textbox(label="Org URN (Hidden)", interactive=False, visible=False)
@@ -253,14 +256,7 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="sky"),
253
  with gr.Tabs() as tabs:
254
  # --- NEW HOME TAB ---
255
  with gr.TabItem("🏠 Home", id="tab_home"):
256
- gr.HTML("""
257
- <div style="text-align: center; margin: 40px 0;">
258
- <h2 style="color: white; font-weight: 700; margin-bottom: 20px;">Welcome to Your Dashboard</h2>
259
- <p style="color: rgba(255,255,255,0.7); font-size: 1.1rem; max-width: 600px; margin: 0 auto;">
260
- Navigate through your LinkedIn analytics, AI-generated reports, and actionable insights to maximize your organization's social media performance.
261
- </p>
262
- </div>
263
- """)
264
  # Call the new function from ui_generators to build the Home tab content
265
  btn_graphs, btn_reports, btn_okr, btn_help = build_home_tab_ui()
266
 
@@ -276,13 +272,8 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="sky"),
276
  # --- REPLACED: Agentic Analysis Report Tab with enhanced UI ---
277
  # The create_enhanced_report_tab function now builds this entire tab's UI.
278
  # It also returns the relevant Gradio components needed for callbacks.
279
- with gr.TabItem("πŸ“Š AI Analysis Reports", id="tab_agentic_report", visible=AGENTIC_MODULES_LOADED):
280
- gr.HTML("""
281
- <div style="text-align: center; margin-bottom: 30px;">
282
- <h2 style="color: white; font-weight: 700; margin-bottom: 10px;">Comprehensive AI Analysis</h2>
283
- <p style="color: rgba(255,255,255,0.7);">Deep insights generated from your LinkedIn organization data</p>
284
- </div>
285
- """)
286
  # The create_enhanced_report_tab function handles the CSS and HTML structure
287
  # MODIFIED: Unpacked 4 values instead of 3
288
  agentic_pipeline_status_md, report_selector_dd, report_header_html_display, report_body_markdown_display = \
@@ -290,12 +281,7 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="sky"),
290
 
291
 
292
  with gr.TabItem("🎯 OKRs & Action Items", id="tab_agentic_okrs", visible=AGENTIC_MODULES_LOADED):
293
- gr.HTML("""
294
- <div style="text-align: center; margin-bottom: 30px;">
295
- <h2 style="color: white; font-weight: 700; margin-bottom: 10px;">AI-Generated OKRs & Tasks</h2>
296
- <p style="color: rgba(255,255,255,0.7);">Strategic objectives and actionable tasks based on your data analysis</p>
297
- </div>
298
- """)
299
  gr.Markdown("## 🎯 AI Generated OKRs and Actionable Tasks (from Bubble.io)")
300
  gr.Markdown("Basato sull'analisi AI, l'agente ha proposto i seguenti OKR.")
301
 
 
30
  )
31
 
32
  #ui import
33
+ from ui.config import custom_title_css
34
 
35
  # NEW: Import the new OKR UI functions
36
  from ui.okr_ui_generator import create_enhanced_okr_tab, format_okrs_for_enhanced_display, get_initial_okr_display
 
132
 
133
  # --- UI LAYOUT ---
134
  # --- ENHANCED UI HEADER ---
135
+ with gr.Blocks(css=custom_title_css) as demo:
136
+ with gr.Row():
137
+ with gr.Column():
138
+ gr.HTML("""
139
+ <div class="title-container">
140
+ <div class="main-title">
141
+ <span class="emoji-icon">πŸš€</span>LinkedIn Organization Dashboard
142
+ </div>
143
+ <div class="main-subtitle">
144
+ Advanced Analytics & AI-Powered Insights for Your LinkedIn Performance
145
+ </div>
146
+ </div>
147
+ """)
148
 
149
  url_user_token_display = gr.Textbox(label="User Token (Hidden)", interactive=False, visible=False)
150
  org_urn_display = gr.Textbox(label="Org URN (Hidden)", interactive=False, visible=False)
 
256
  with gr.Tabs() as tabs:
257
  # --- NEW HOME TAB ---
258
  with gr.TabItem("🏠 Home", id="tab_home"):
259
+
 
 
 
 
 
 
 
260
  # Call the new function from ui_generators to build the Home tab content
261
  btn_graphs, btn_reports, btn_okr, btn_help = build_home_tab_ui()
262
 
 
272
  # --- REPLACED: Agentic Analysis Report Tab with enhanced UI ---
273
  # The create_enhanced_report_tab function now builds this entire tab's UI.
274
  # It also returns the relevant Gradio components needed for callbacks.
275
+ with gr.TabItem("πŸ“ AI Analysis Reports", id="tab_agentic_report", visible=AGENTIC_MODULES_LOADED):
276
+
 
 
 
 
 
277
  # The create_enhanced_report_tab function handles the CSS and HTML structure
278
  # MODIFIED: Unpacked 4 values instead of 3
279
  agentic_pipeline_status_md, report_selector_dd, report_header_html_display, report_body_markdown_display = \
 
281
 
282
 
283
  with gr.TabItem("🎯 OKRs & Action Items", id="tab_agentic_okrs", visible=AGENTIC_MODULES_LOADED):
284
+
 
 
 
 
 
285
  gr.Markdown("## 🎯 AI Generated OKRs and Actionable Tasks (from Bubble.io)")
286
  gr.Markdown("Basato sull'analisi AI, l'agente ha proposto i seguenti OKR.")
287