GuglielmoTor commited on
Commit
3ff351d
·
verified ·
1 Parent(s): c0a4e63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -12
app.py CHANGED
@@ -35,22 +35,14 @@ from formulas import PLOT_FORMULAS # Keep this if used by AnalyticsTab
35
  from features.chatbot.chatbot_prompts import get_initial_insight_prompt_and_suggestions # Pass this
36
  from features.chatbot.chatbot_handler import generate_llm_response # Pass this
37
 
 
38
  # --- NEW AGENTIC PIPELINE IMPORTS ---
39
  try:
40
  from run_agentic_pipeline import run_agentic_pipeline_autonomously
41
- from ui.insights_ui_generator import (
42
- format_report_to_markdown,
43
- extract_key_results_for_selection,
44
- format_single_okr_for_display
45
- )
46
  AGENTIC_MODULES_LOADED = True
47
- except ImportError as e:
48
  logging.error(f"Could not import agentic pipeline modules: {e}. Tabs 3 and 4 will be disabled.")
49
  AGENTIC_MODULES_LOADED = False
50
- async def run_full_analytics_orchestration(*args, **kwargs): return None # Placeholder
51
- def format_report_to_markdown(report_string): return "Agentic modules not loaded. Report unavailable." # Placeholder
52
- def extract_key_results_for_selection(okrs_dict): return [] # Placeholder
53
- def format_single_okr_for_display(okr_data, **kwargs): return "Agentic modules not loaded. OKR display unavailable." # Placeholder
54
 
55
 
56
  # --- IMPORT THE NEW ANALYTICS TAB MODULE ---
@@ -247,7 +239,9 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="sky"),
247
  show_progress="full"
248
  ).then(
249
  fn=run_agentic_pipeline_autonomously, # Generator function
250
- inputs=agentic_pipeline_inputs,
 
 
251
  outputs=agentic_pipeline_outputs_list,
252
  show_progress="minimal" # Use minimal for generators that yield status
253
  )
@@ -266,7 +260,9 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="sky"),
266
  )
267
  sync_event_part2.then(
268
  fn=run_agentic_pipeline_autonomously, # Generator function
269
- inputs=agentic_pipeline_inputs,
 
 
270
  outputs=agentic_pipeline_outputs_list,
271
  show_progress="minimal"
272
  )
 
35
  from features.chatbot.chatbot_prompts import get_initial_insight_prompt_and_suggestions # Pass this
36
  from features.chatbot.chatbot_handler import generate_llm_response # Pass this
37
 
38
+
39
  # --- NEW AGENTIC PIPELINE IMPORTS ---
40
  try:
41
  from run_agentic_pipeline import run_agentic_pipeline_autonomously
 
 
 
 
 
42
  AGENTIC_MODULES_LOADED = True
43
+ except:
44
  logging.error(f"Could not import agentic pipeline modules: {e}. Tabs 3 and 4 will be disabled.")
45
  AGENTIC_MODULES_LOADED = False
 
 
 
 
46
 
47
 
48
  # --- IMPORT THE NEW ANALYTICS TAB MODULE ---
 
239
  show_progress="full"
240
  ).then(
241
  fn=run_agentic_pipeline_autonomously, # Generator function
242
+ inputs=[agentic_pipeline_inputs,
243
+ orchestration_raw_results_st,
244
+ selected_key_result_ids_st],
245
  outputs=agentic_pipeline_outputs_list,
246
  show_progress="minimal" # Use minimal for generators that yield status
247
  )
 
260
  )
261
  sync_event_part2.then(
262
  fn=run_agentic_pipeline_autonomously, # Generator function
263
+ inputs=[agentic_pipeline_inputs,
264
+ orchestration_raw_results_st,
265
+ selected_key_result_ids_st],
266
  outputs=agentic_pipeline_outputs_list,
267
  show_progress="minimal"
268
  )