Spaces:
Running
Running
File size: 643 Bytes
529cc96 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | """Starting point for lichess-bot."""
from lib.lichess_bot import start_program
import threading
import gradio as gr
def launch_gradio():
# This keeps Hugging Face happy in the background
with gr.Blocks() as demo:
gr.Markdown("# 🤖 Stockfish 18 Lichess Bot")
gr.Markdown("Status: **Healthy & Running**")
demo.launch(server_name="0.0.0.0", server_port=7860)
if __name__ == "__main__":
# 1. Start Gradio in the background first
gradio_thread = threading.Thread(target=launch_gradio, daemon=True)
gradio_thread.start()
# 2. Run the original bot logic EXACTLY how it used to run
start_program() |