temp added code for background

This commit is contained in:
Ubuntu 2024-09-11 11:07:07 +00:00
parent 50d7e4a89c
commit 2987c40bff
2 changed files with 28 additions and 2 deletions

View File

@ -9,12 +9,32 @@ from src.components.index_pipeline import IndexPipeline
from src.enums import EnvVars
from src.functions import initialize_app
from src.graphrag_api import GraphragAPI
import base64
# Load environment variables
initialized = initialize_app()
st.session_state["initialized"] = True if initialized else False
# def get_base64(bin_file):
# with open(bin_file, 'rb') as f:
# data = f.read()
# return base64.b64encode(data).decode()
# def set_background(png_file):
# bin_str = get_base64(png_file)
# page_bg_img = '''
# <style>
# .stApp {
# background-image: url("data:image/png;base64,%s");
# background-size: cover;
# }
# </style>
# ''' % bin_str
# st.markdown(page_bg_img, unsafe_allow_html=True)
def graphrag_app(initialized: bool):
# main entry point for app interface
# st.title("Microsoft GraphRAG Copilot")
@ -27,6 +47,7 @@ def graphrag_app(initialized: bool):
""",
unsafe_allow_html=True
)
# set_background('./src/images/background3.png')
main_tab, prompt_gen_tab, prompt_edit_tab, index_tab, query_tab = st.tabs(
[

View File

@ -32,13 +32,14 @@ div[data-baseweb="radio"] > div:focus-within {
}
div[data-baseweb="select"] > div {
border-color: transparent !important; /* Remove the initial red border */
border-color: rgb(48, 48, 48)!important; /* Remove the initial red border */
/* box-shadow: 0 0 0 2px rgba(28, 28, 28, 0.5); Optional: add shadow for better focus indication */
}
/* Change border color when the selectbox is focused (clicked) */
div[data-baseweb="select"] > div:focus-within {
border-color: rgb(48, 48, 48) !important; /* Set the border color to dark gray when focused */
/* border-color: rgb(48, 48, 48) !important; Set the border color to dark gray when focused */
background-color: white;
}
@ -208,3 +209,7 @@ button[kind="primary"] {
cursor: pointer; /* Change to pointer cursor */
}
.footer {
background-color: transparent;
}