Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ from ui.ui_generators import (
|
|
30 |
)
|
31 |
|
32 |
#ui import
|
33 |
-
from ui.config import
|
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.
|
136 |
-
with gr.
|
137 |
-
gr.
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
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 |
-
|
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("
|
280 |
-
|
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 |
-
|
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 |
|