BlueMoonBot commited on
Commit
529cc96
·
verified ·
1 Parent(s): 162c3b1

Create lichess.py

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