-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
50 lines (37 loc) · 1.43 KB
/
main.py
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
import streamlit as st
from emma.streamlit_utils import (
ensure_infrahub_address_and_branch,
schema_bootstrap_message,
set_page_config,
)
from menu import menu
set_page_config(title="Emma - An assistant for Infrahub")
# Empty schema info goes first
schema_bootstrap_message()
# Set columns to receive content
left, right = st.columns([1, 1.6], gap="medium", vertical_alignment="center")
# Left is for Emma avatar
left.image(image="static/emma.png", caption="Hello, I'm Emma")
# Right is for the text
with right:
st.write("# Welcome! :wave:")
st.markdown(
"""
Emma is an agent designed to help you interact with Infrahub.
Emma will look for the **INFRAHUB_ADDRESS** environment variable to connect to your Infrahub instance.
However, you can also set or update the address directly in the UI if needed.
Use the sidebar to navigate between different functionalities, such as exploring data, importing data,
generating schemas, and visualizing schemas.
"""
)
st.info(
icon="⚠️",
body="""
Emma is an experimental and quickly evolving tool developed by the team at OpsMill.
As such, she may not always work perfectly. Give us feedback if she misbehaves!
""",
)
if "infrahub_address" not in st.session_state:
st.session_state.infrahub_address = None
ensure_infrahub_address_and_branch()
menu()