""" Simple script to run the Streamlit cybersecurity agent web app. """ import subprocess import sys import os from pathlib import Path def main(): """Run the Streamlit app.""" # Get the directory where this script is located script_dir = Path(__file__).parent app_path = script_dir / "app.py" if not app_path.exists(): print(f"Error: app.py not found at {app_path}") sys.exit(1) print("Starting Cybersecurity Agent Web App...") print("=" * 50) print("The app will open in your default web browser.") print("If it doesn't open automatically, go to: http://localhost:8501") print("=" * 50) print() try: # Run streamlit with the app subprocess.run( [ sys.executable, "-m", "streamlit", "run", str(app_path), "--server.port", "8501", "--server.address", "localhost", ], check=True, ) except subprocess.CalledProcessError as e: print(f"Error running Streamlit: {e}") sys.exit(1) except KeyboardInterrupt: print("\nApp stopped by user.") sys.exit(0) if __name__ == "__main__": main()