minhan6559 commited on
Commit
6dd6c60
·
verified ·
1 Parent(s): f2fde6b

Delete run_app.py

Browse files
Files changed (1) hide show
  1. run_app.py +0 -53
run_app.py DELETED
@@ -1,53 +0,0 @@
1
- """
2
- Simple script to run the Streamlit cybersecurity agent web app.
3
- """
4
-
5
- import subprocess
6
- import sys
7
- import os
8
- from pathlib import Path
9
-
10
-
11
- def main():
12
- """Run the Streamlit app."""
13
- # Get the directory where this script is located
14
- script_dir = Path(__file__).parent
15
- app_path = script_dir / "app.py"
16
-
17
- if not app_path.exists():
18
- print(f"Error: app.py not found at {app_path}")
19
- sys.exit(1)
20
-
21
- print("Starting Cybersecurity Agent Web App...")
22
- print("=" * 50)
23
- print("The app will open in your default web browser.")
24
- print("If it doesn't open automatically, go to: http://localhost:8501")
25
- print("=" * 50)
26
- print()
27
-
28
- try:
29
- # Run streamlit with the app
30
- subprocess.run(
31
- [
32
- sys.executable,
33
- "-m",
34
- "streamlit",
35
- "run",
36
- str(app_path),
37
- "--server.port",
38
- "8501",
39
- "--server.address",
40
- "localhost",
41
- ],
42
- check=True,
43
- )
44
- except subprocess.CalledProcessError as e:
45
- print(f"Error running Streamlit: {e}")
46
- sys.exit(1)
47
- except KeyboardInterrupt:
48
- print("\nApp stopped by user.")
49
- sys.exit(0)
50
-
51
-
52
- if __name__ == "__main__":
53
- main()