-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
46 lines (38 loc) · 1.22 KB
/
setup.py
File metadata and controls
46 lines (38 loc) · 1.22 KB
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
#!/usr/bin/env python
"""
Auto-setup script for Agentic Analysis Masterclass
Run this once after cloning to set up the environment and start the app.
"""
import subprocess
import sys
import os
import webbrowser
import time
def main():
print("=" * 60)
print(" AGENTIC ANALYSIS MASTERCLASS - AUTO SETUP")
print("=" * 60)
# Install requirements
print("\n[1/3] Installing dependencies...")
subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", "requirements.txt", "-q"])
print(" Dependencies installed!")
# Ensure data folder exists
print("\n[2/3] Setting up data folder...")
os.makedirs("data", exist_ok=True)
print(" Data folder ready!")
# Start the app
print("\n[3/3] Starting the app...")
print("\n" + "=" * 60)
print(" APP RUNNING AT: http://localhost:3000")
print("=" * 60)
print("\nPress Ctrl+C to stop the server\n")
# Open browser after a short delay
def open_browser():
time.sleep(2)
webbrowser.open("http://localhost:3000")
import threading
threading.Thread(target=open_browser, daemon=True).start()
# Run the app
subprocess.call([sys.executable, "app.py"])
if __name__ == "__main__":
main()