File size: 1,524 Bytes
76aa573
f5f591a
76aa573
49655be
7528ee2
76aa573
dff029f
 
 
 
 
76aa573
 
7528ee2
 
f5f591a
 
 
7528ee2
 
 
dff029f
 
49655be
8346afa
 
dff029f
 
8346afa
dff029f
 
 
7528ee2
 
 
49655be
7528ee2
dff029f
b3b929b
7528ee2
 
 
c587d34
b3b929b
 
 
 
 
 
 
 
76aa573
 
dff029f
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
42
43
44
45
46
47
48
49
50
51
52
53
54
import gradio as gr
from datetime import datetime

from src.ui import sidebar_ui, dashboard_ui
from src.ui.session import session_state

custom_theme = gr.themes.Base(
    primary_hue="blue",
    secondary_hue="green",
    neutral_hue="gray",
    font=[gr.themes.GoogleFont("Open Sans"), "sans-serif"],
)

STATE = {
    "running": False,
    "date": datetime.now(),
    "part_id": 0,
    "status": {},
    "data": {},
}

with gr.Blocks(theme=custom_theme) as demo:

        # HEADER
        gr.Markdown("# Efficiency Agent ⚡️️")
        gr.Markdown("### *Smarter Efficiency. Across Industries & Services !*")
        gr.Markdown(
            """
            This demo showcases the capabilities of an AI-Agent designed to assist in production processes.  
            You can interact with the chatbot to get insights and assistance on production-related queries.
            """
        )

        state = gr.State(STATE)

        # CHAT INTERFACE
        sidebar_ui(state, width=700, visible=True)

        # DASHBOARD
        with gr.Tab("Dashboard"):
            session_state(state)
            dashboard_ui(state)

        # DESCRIPTION
        with gr.Tab("Description"):
            gr.Markdown(
                """
                IndustryMind AI is an AI-powered chatbot designed to assist with industrial production processes. 
                It can help you manage production lines, monitor equipment, and optimize workflows.
                """
            )

if __name__ == "__main__":
    demo.launch()