File size: 697 Bytes
1fcb4a0
b3f3a88
 
1fcb4a0
 
 
 
b3f3a88
1fcb4a0
 
 
b3f3a88
 
 
 
 
 
 
 
 
1fcb4a0
 
 
 
 
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
import os
import sys
from create_pretrained_model import create_pretrained_model

def main():
    print("🚀 STARTING ON-SERVER MODEL RETRAINING...")
    
    # Define output directory
    output_dir = "./models"
    os.makedirs(output_dir, exist_ok=True)
    
    # Run the model creation process which:
    # 1. Generates synthetic data
    # 2. Trains the classifier
    # 3. Saves it in the server's native format (fixing version mismatch)
    create_pretrained_model(
        output_dir=output_dir,
        n_samples=2000,
        random_state=42
    )
        
    print("✅ RETRAINING COMPLETE! Model is now perfectly synced with server versions.")

if __name__ == "__main__":
    main()