Skip to content

Commit

Permalink
removing top toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
beingkk committed Nov 21, 2023
1 parent 78e0981 commit 5e56d67
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 2 deletions.
19 changes: 19 additions & 0 deletions src/genai/streamlit_pages/dm_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,25 @@

def eyfs_dm_kb(index_name: str = "eyfs-index", sidebar: bool = True) -> None:
"""Run the Development Matters app."""

# Define your custom CSS
custom_css = """
<style>
/* Adjust the selector as needed */
.stHeadingContainer {
margin-top: -100px; /* Reduce the top margin */
}
#MainMenu {visibility: hidden;}
footer {visibility: hidden;}
header {
visibility: hidden
}
</style>
"""

# Apply the custom CSS
st.markdown(custom_css, unsafe_allow_html=True)

st.title("Generate activities anchored to the Development Matters guidance")
areas_of_learning_desc = read_json("src/genai/eyfs/areas_of_learning.json")
aol = list(areas_of_learning_desc.keys())
Expand Down
21 changes: 20 additions & 1 deletion src/genai/streamlit_pages/eli3_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@

def eli3(sidebar: bool = True) -> None:
"""Explain me a concept like I'm 3."""

# Define your custom CSS
custom_css = """
<style>
/* Adjust the selector as needed */
.stHeadingContainer {
margin-top: -100px; /* Reduce the top margin */
}
#MainMenu {visibility: hidden;}
footer {visibility: hidden;}
header {
visibility: hidden
}
</style>
"""

# Apply the custom CSS
st.markdown(custom_css, unsafe_allow_html=True)

st.title("Explain-Like-I'm-3")

# Create the generator
Expand Down Expand Up @@ -44,7 +63,7 @@ def eli3(sidebar: bool = True) -> None:
st.markdown(message["content"])

# Accept user input
prompt = st.chat_input("How do whales breath?")
prompt = st.chat_input("How do whales breathe?")
if prompt:
# Display user message in chat message container
with st.chat_message("user"):
Expand Down
2 changes: 1 addition & 1 deletion src/genai/streamlit_pages/eyfs_compare_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def eyfs_compare() -> None:
# Get the user input
query = st.text_input(
label="**What's the topic you want activities for?**",
value="Let's create activities educating children on how whales breath",
value="Let's create activities educating children on how whales breathe",
help="Prompt the large language model with a some text and it will generate an activity plan for you.",
)
if st.button(label="**Generate**", help="Generate an answer."):
Expand Down
19 changes: 19 additions & 0 deletions src/genai/streamlit_pages/eyfs_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@

def early_year_activity_plan() -> None:
"""Come up with activities for children."""

# Define your custom CSS
custom_css = """
<style>
/* Adjust the selector as needed */
.stHeadingContainer {
margin-top: -100px; /* Reduce the top margin */
}
#MainMenu {visibility: hidden;}
footer {visibility: hidden;}
header {
visibility: hidden
}
</style>
"""

# Apply the custom CSS
st.markdown(custom_css, unsafe_allow_html=True)

st.title("Generating activity plans grounded in EY foundation stages")
areas_of_learning_desc = read_json("src/genai/eyfs/areas_of_learning.json")
aol = list(areas_of_learning_desc.keys())
Expand Down
19 changes: 19 additions & 0 deletions src/genai/streamlit_pages/parenting_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,25 @@

def parenting_chatbot(aws_key: str, aws_secret: str, s3_path: str, sidebar: bool = True) -> None:
"""Early-years parenting chatbot."""

# Define your custom CSS
custom_css = """
<style>
/* Adjust the selector as needed */
.stHeadingContainer {
margin-top: -100px; /* Reduce the top margin */
}
#MainMenu {visibility: hidden;}
footer {visibility: hidden;}
header {
visibility: hidden
}
</style>
"""

# Apply the custom CSS
st.markdown(custom_css, unsafe_allow_html=True)

st.title("Early-years parenting chatbot")
st.write(
"This is a chatbot based on information from the [NHS Start for Life](https://www.nhs.uk/start-for-life/) website. "
Expand Down

0 comments on commit 5e56d67

Please sign in to comment.