import json from pathlib import Path from lotto_predictor import predict_for_game_v3, NumpyEncoder def main(): # Lucky for Life CSV path csv_path = Path("Lucky For Life.csv") try: # Run prediction for Lucky for Life (game key "l4l") print("Generating Lucky for Life prediction...") res = predict_for_game_v3(csv_path, "l4l", run_backtest=False) print("Prediction:") print(json.dumps(res, indent=2, cls=NumpyEncoder)) print(f"\nPredicted Numbers: {res['numbers']}") if res.get('star'): print(f"Lucky Ball: {res['star']}") # Print model info if present model_info = res.get('model_info', {}) print(f"\nModel built for {model_info.get('numbers_modeled', 0)} " f"out of {model_info.get('total_possible', 0)} possible numbers") except Exception as e: print(f"Prediction failed: {str(e)}") import traceback traceback.print_exc() if __name__ == "__main__": main()