Spaces:
Sleeping
Sleeping
Update main.py
Browse files129 unmodified lines1301311321331341351361373 unmodified lines141142143144145146147148149129 unmodified lines# Start the processtransport, engine = await chess.engine.popen_uci(ENGINE_PATH)# Immediate basic configuration (Low resources for HF stability)await engine.configure({"Hash": 32, "Threads": 1})if os.path.exists(NNUE_PATH):try:3 unmodified linesexcept Exception as e:print(f"[ERROR] Failed to configure NNUE: {str(e)}")# CRITICAL: Wait for engine to be actually readyawait engine.isready()print(f"[DEBUG] Engine started successfully: {engine.id.get('name', 'Unknown')}")return engineexcept Exception as e:129 unmodified lines1301311321331341351361373 unmodified lines141142143144145146147148129 unmodified lines# Start the processtransport, engine = await chess.engine.popen_uci(ENGINE_PATH)# Configure Engine (128MB Hash, Balanced for HF performance)await engine.configure({"Hash": 128, "Threads": 1})if os.path.exists(NNUE_PATH):try:3 unmodified linesexcept Exception as e:print(f"[ERROR] Failed to configure NNUE: {str(e)}")# Confirmation logprint(f"[DEBUG] Engine initialized: {engine.id.get('name', 'Unknown')}")return engineexcept Exception as e:
main.py+4-5