File size: 2,253 Bytes
09e8c1e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/env python3
"""
NACC UI Launcher - Select and launch different UI variants
Allows easy comparison between conversational, enterprise, and professional UIs
"""

import sys
import argparse
from pathlib import Path

def launch_ui(share: bool = False, port: int = 7860):
    """Launch the NACC UI"""
    
    print(f"\n{'='*80}")
    print(f"๐Ÿš€ NACC UI LAUNCHER")
    print(f"{'='*80}")
    print(f"Port: {port}")
    print(f"Share: {share}")
    print(f"{'='*80}\n")
    
    print("๐Ÿ’ผ Launching NACC Professional UI")
    print("   Features: Dark theme, dashboard, file browser, help system\n")
    from src.nacc_ui.professional_ui_v2 import create_professional_ui_v2
    demo = create_professional_ui_v2()
    demo.launch(server_name="0.0.0.0", server_port=port, share=share)


def main():
    parser = argparse.ArgumentParser(
        description="NACC UI Launcher - Network AI Command & Control Interface",
        formatter_class=argparse.RawDescriptionHelpFormatter,
        epilog="""
Examples:
  # Launch NACC UI (default port 7860)
  python -m src.nacc_ui.launch_ui
  
  # Launch with sharing enabled
  python -m src.nacc_ui.launch_ui --share
  
  # Launch on custom port
  python -m src.nacc_ui.launch_ui --port 8080

About NACC:
  Network AI Command & Control is an intelligent network orchestration
  platform that combines natural language processing with automation.
  
  Features:
  - Natural language command interface
  - Real-time network dashboard
  - Multi-node orchestration
  - File browser and management
  - Context-aware AI conversations
        """
    )
    
    parser.add_argument(
        '--share', '-s',
        action='store_true',
        help='Create public sharing link'
    )
    
    parser.add_argument(
        '--port', '-p',
        type=int,
        default=7860,
        help='Port to run on (default: 7860)'
    )
    
    args = parser.parse_args()
    
    try:
        launch_ui(args.share, args.port)
    except KeyboardInterrupt:
        print("\n\n๐Ÿ‘‹ Shutting down NACC UI...")
        sys.exit(0)
    except Exception as e:
        print(f"\nโŒ Error launching UI: {e}")
        import traceback
        traceback.print_exc()
        sys.exit(1)


if __name__ == "__main__":
    main()