""" Seeds the incident log CSV and ChromaDB with sample data for testing. Run once: python -m utils.seed_data """ import sys, os sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) from utils.incident_logger import log_incident from rag_module.vector_store import rebuild_from_csv SAMPLE_INCIDENTS = [ ("KA05MN1234", "car", "Gate_A", "normal", ""), ("MH12AB5678", "truck", "VIP_LOT", "unauthorized", "Heavy vehicle in VIP zone"), ("KA01XY9999", "car", "Gate_B", "flagged", "Reported stolen vehicle"), ("DL4CAF0001", "bus", "Gate_A", "normal", ""), ("TN09CD2222", "car", "COMPACT_ONLY","normal", ""), ("UNKNOWN", "car", "Gate_C", "flagged", "Plate unreadable"), ("KA05MN1234", "car", "Gate_A", "anomaly", "Same plate seen 6x in 10 min"), ("AP28PQ3344", "motorcycle", "Gate_B", "normal", ""), ("KA01XY9999", "car", "Gate_A", "unauthorized", "Blacklisted vehicle re-entry"), ("GJ05BK7777", "car", "Gate_A", "normal", ""), ] print("Seeding incidents...") for plate, cls, zone, status, notes in SAMPLE_INCIDENTS: row = log_incident(plate, cls, zone, status, notes) print(f" Logged: {row['id']} | {plate} | {status}") print("\nRebuilding ChromaDB from CSV...") rebuild_from_csv() print("Done! You can now query the RAG pipeline.")