File size: 1,230 Bytes
aa2d45f
 
 
 
 
 
c9269a5
aa2d45f
e3285d7
aa2d45f
 
 
 
 
 
 
 
 
 
 
 
e3285d7
 
 
aa2d45f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e3285d7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import gradio as gr

from mcp_servers.mcp_manager import start_mcp_servers
start_mcp_servers()

from support.log_manager import logger
from support.game_settings import custom_header
from support.settings import SERVER_PORT
from pages import home, play, stats, how_to_play
from support.style.css import final_css
from support.game_settings import JS


# Create main application
with gr.Blocks(fill_width=True, title="Agentic Codenames", css=final_css, js=JS) as demo:
    gr.HTML(custom_header)

    with gr.Tabs(elem_classes="hidden-tabs"):
        with gr.Tab("๐Ÿ  Home", id="home_id_tab", elem_classes="tab_btn"):
            home.demo.render()

        with gr.Tab("โ“ How to Play", id="how_to_play_id_tab", elem_classes="tab_btn"):
            how_to_play.demo.render()

        with gr.Tab("๐ŸŽฎ Play", id="play_id_tab", elem_classes="tab_btn"):
            play.demo.render()

        with gr.Tab("๐Ÿ“Š Stats", id="stats_id_tab", elem_classes="tab_btn"):
            stats.demo.render()


if __name__ == "__main__":
    demo.launch(
        share=False,
        inline=True,
        server_name='0.0.0.0',
        server_port=SERVER_PORT,
        allowed_paths=["assets"],
        favicon_path='assets/favicon.ico'
    )