Spaces:
Running
Running
Download lichess.py from BlueMoonBot/BubbleBot: direct link, hf CLI and curl.
- Browser
- Download file 643 Bytes
-
https://huggingface.co/spaces/BlueMoonBot/BubbleBot/resolve/main/lichess.py
- Command line
-
hf download hf://spaces/BlueMoonBot/BubbleBot/lichess.py
-
curl -L -o lichess.py https://huggingface.co/spaces/BlueMoonBot/BubbleBot/resolve/main/lichess.py
643 Bytes
| """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() |