| """ |
| Minimalist, math-first Gradio UI for Agentic Reliability Framework (ARF) |
| Only Gradio components; Streamlit removed |
| """ |
|
|
| import gradio as gr |
| from typing import Dict, List, Any |
|
|
| |
| |
| |
| def create_header() -> gr.HTML: |
| return gr.HTML("<h2>🚀 Agentic Reliability Framework v3.3.6 (OSS Edition)</h2>") |
|
|
| def create_status_bar() -> gr.HTML: |
| return gr.HTML( |
| "✅ System Online · 🧠 Agentic Core Active · 📦 OSS Mode" |
| ) |
|
|
| |
| |
| |
| def create_tab1_incident_demo() -> tuple: |
| """ |
| Returns 12 Gradio components (matching previous unpacking in app.py) |
| """ |
| scenario_dropdown = gr.Dropdown(choices=["Cache Miss Storm", "DB Latency Spike"], label="Incident Scenario") |
| scenario_description = gr.Textbox(value="Select a scenario to begin analysis.", label="Description") |
| metrics_display = gr.Textbox(value="Live Metrics: TBD", label="Metrics") |
| impact_display = gr.Textbox(value="Estimated Business Impact: TBD", label="Impact") |
| |
| approval_display = gr.Textbox(value="Approval Status: N/A", label="Approval") |
| oss_results_display = gr.Textbox(value="OSS Results: N/A", label="OSS") |
| enterprise_results_display = gr.Textbox(value="Enterprise Results: N/A", label="Enterprise") |
| |
| run_oss_btn = gr.Button("Run OSS Analysis") |
| execute_enterprise_btn = gr.Button("Execute Enterprise Healing") |
| require_human_btn = gr.Button("Require Human Approval") |
| run_demo_btn = gr.Button("Run Demo") |
| |
| return ( |
| scenario_dropdown, scenario_description, metrics_display, impact_display, |
| approval_display, oss_results_display, enterprise_results_display, |
| run_oss_btn, execute_enterprise_btn, require_human_btn, run_demo_btn, gr.Textbox(value="", visible=False) |
| ) |
|
|
| |
| |
| |
| def create_tab2_business_roi() -> tuple: |
| roi_display = gr.Textbox(value="ROI Calculator Output: TBD", label="ROI") |
| return (roi_display,) |
|
|
| |
| |
| |
| def create_tab3_enterprise_features() -> tuple: |
| features_display = gr.Textbox( |
| value="- Self-Healing Agentic Core\n- Enhanced Monitoring\n- Auto-Scaling", |
| label="Enterprise Features" |
| ) |
| return (features_display,) |
|
|
| |
| |
| |
| def create_tab4_audit_trail() -> tuple: |
| audit_display = gr.Textbox(value="Audit logs will appear here.", label="Audit Trail") |
| return (audit_display,) |
|
|
| |
| |
| |
| def create_tab5_learning_engine() -> tuple: |
| learning_display = gr.Textbox(value="Learning engine stats TBD.", label="Learning Engine") |
| return (learning_display,) |
|
|
| |
| |
| |
| def create_footer() -> gr.HTML: |
| return gr.HTML("ARF © 2025 · Self-Healing Agentic Systems") |
|
|