petter2025 commited on
Commit
11c7ed7
Β·
verified Β·
1 Parent(s): 832ec68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -47
app.py CHANGED
@@ -1667,20 +1667,6 @@ def create_enhanced_ui():
1667
  label="Predictive Forecasts",
1668
  value={}
1669
  )
1670
-
1671
- with gr.Accordion("πŸ€– Claude AI Synthesis", open=True):
1672
- gr.Markdown("""
1673
- **Claude Opus 4.5 Executive Summary:**
1674
- - πŸ“‹ Incident synthesis from all agents
1675
- - 🎯 Root cause identification
1676
- - πŸ’‘ Recommended recovery actions
1677
- - ⏰ Impact and recovery time estimates
1678
- """)
1679
-
1680
- claude_output = gr.Markdown(
1681
- value="*Claude AI synthesis will appear here after incident analysis*",
1682
- label="AI Executive Summary"
1683
- )
1684
 
1685
  gr.Markdown("### πŸ“ˆ Recent Events (Last 15)")
1686
  events_table = gr.Dataframe(
@@ -1805,44 +1791,12 @@ def create_enhanced_ui():
1805
 
1806
  agent_insights_data = result.get("multi_agent_analysis", {})
1807
  predictive_insights_data = agent_insights_data.get('predictive_insights', {})
1808
-
1809
- # Extract Claude synthesis for display
1810
- claude_synthesis = result.get('claude_synthesis', {})
1811
- claude_text = claude_synthesis.get('summary', '*No Claude synthesis available*')
1812
-
1813
- # Format Claude output beautifully
1814
- claude_display = f"""
1815
- ### πŸ€– Claude Opus 4.5 Executive Analysis
1816
-
1817
- {claude_text}
1818
-
1819
- ---
1820
- *Generated: {claude_synthesis.get('timestamp', 'N/A')}*
1821
- *Model: {claude_synthesis.get('source', 'claude-opus-4')}*
1822
- """
1823
-
1824
- return (
1825
- output_msg,
1826
- agent_insights_data,
1827
- predictive_insights_data,
1828
- claude_display,
1829
- gr.Dataframe(
1830
- headers=["Timestamp", "Component", "Latency", "Error Rate", "Throughput", "Severity", "Analysis"],
1831
- value=table_data,
1832
- wrap=True
1833
- )
1834
- )
1835
-
1836
- except Exception as e:
1837
- error_msg = f"❌ Error processing event: {str(e)}"
1838
- logger.error(error_msg, exc_info=True)
1839
- return error_msg, {}, {}, "*Processing error*", gr.Dataframe(value=[])
1840
 
1841
  # FIXED: Use async handler directly
1842
  submit_btn.click(
1843
  fn=submit_event_enhanced_async,
1844
  inputs=[component, latency, error_rate, throughput, cpu_util, memory_util],
1845
- outputs=[output_text, agent_insights, predictive_insights, claude_output, events_table]
1846
  )
1847
 
1848
  return demo
 
1667
  label="Predictive Forecasts",
1668
  value={}
1669
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1670
 
1671
  gr.Markdown("### πŸ“ˆ Recent Events (Last 15)")
1672
  events_table = gr.Dataframe(
 
1791
 
1792
  agent_insights_data = result.get("multi_agent_analysis", {})
1793
  predictive_insights_data = agent_insights_data.get('predictive_insights', {})
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1794
 
1795
  # FIXED: Use async handler directly
1796
  submit_btn.click(
1797
  fn=submit_event_enhanced_async,
1798
  inputs=[component, latency, error_rate, throughput, cpu_util, memory_util],
1799
+ outputs=[output_text, agent_insights, predictive_insights, events_table]
1800
  )
1801
 
1802
  return demo