File size: 508 Bytes
b00d2c6
7ce64c9
 
 
 
 
 
 
 
b00d2c6
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr
import subprocess
import threading

# Run the bot in background
def run_bot():
    subprocess.Popen(["python3", "bot/main.py"])

threading.Thread(target=run_bot, daemon=True).start()

def launch_bot():
    return "The Movie Provider Bot is running in the background. Interact via Telegram."

with gr.Blocks() as demo:
    gr.Markdown("# 🎬 TheMovieProviderBot Interface")
    gr.Markdown("Interact with the bot on Telegram.")
    gr.Button("Start Bot").click(launch_bot)

demo.launch()