bot / lichess_bot.py
BlueMoonBot's picture
Create lichess_bot.py
084c914 verified
Raw History Blame Contribute Delete
391 Bytes
import threading
from http.server import SimpleHTTPRequestHandler, HTTPServer
def run_dummy_server():
# Hugging Face looks for port 7860 by default
server = HTTPServer(('0.0.0.0', 7860), SimpleHTTPRequestHandler)
server.serve_forever()
# Start the server in a separate background thread so it doesn't block the bot
threading.Thread(target=run_dummy_server, daemon=True).start()