-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
40 lines (32 loc) · 1.19 KB
/
Copy pathsetup.py
File metadata and controls
40 lines (32 loc) · 1.19 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
"""
One-click setup script for Student Performance Tracker.
Generates synthetic Indian student data, loads it into SQLite, and trains the ML model.
Usage:
python setup.py
"""
import subprocess
import sys
import os
def main():
base_dir = os.path.dirname(os.path.abspath(__file__))
src_dir = os.path.join(base_dir, 'src')
steps = [
("Step 1/3: Generating synthetic Indian student data...", [sys.executable, os.path.join(src_dir, 'generate_data.py')]),
("Step 2/3: Loading data into SQLite database...", [sys.executable, os.path.join(src_dir, 'db.py')]),
("Step 3/3: Training ML model + SHAP explainer...", [sys.executable, os.path.join(src_dir, 'train_model.py')]),
]
print("=" * 60)
print(" Student Performance Tracker — Setup")
print("=" * 60)
for msg, cmd in steps:
print(f"\n{msg}")
result = subprocess.run(cmd, cwd=base_dir)
if result.returncode != 0:
print(f"❌ Failed at: {msg}")
sys.exit(1)
print("\n" + "=" * 60)
print(" [OK] Setup complete! Run the dashboard with:")
print(" streamlit run app.py")
print("=" * 60)
if __name__ == "__main__":
main()