CBot / lichess-bot.py
Hectozar's picture
Update lichess-bot.py
05865da 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()