deception-analysis-api / retrain_on_server.py
APEXPRIT's picture
Upload folder using huggingface_hub
b3f3a88 verified
Raw History Blame Contribute Delete
697 Bytes
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()