Skip to content

Commit

Permalink
feat: Update about page with SLAM information
Browse files Browse the repository at this point in the history
  • Loading branch information
chandralegend committed May 3, 2024
1 parent 4687143 commit 9802400
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/src/components/about.jac
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
'''About Page for SLAM'''
import:py streamlit as st;

'''About Tab'''
can about {
github_mk = '''[![GitHub Repo stars](https://img.shields.io/github/stars/Jaseci-Labs/slam?style=social)](https://github.com/Jaseci-Labs/slam)''';
citation = '''```Chandra Irugalbandara and Ashish Mahendra and Roland Daynauth and Tharuka Kasthuri Arachchige and Jayanaka Dantanarayana and Krisztian Flautner and Lingjia Tang and Yiping Kang and Jason Mars. (2024). Scaling Down to Scale Up: A Cost-Benefit Analysis of Replacing OpenAI's LLM with Open Source SLMs in Production. Arxiv. https://arxiv.org/abs/2312.14972```''';
Expand Down
8 changes: 6 additions & 2 deletions app/src/components/theme.jac
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
import:py streamlit as st;
'''Theme Utils for Streamlit'''
import:py os;
import:py from PIL, Image;
import:py streamlit as st;

'''Load custom CSS for Streamlit app'''
can local_css(file_name: str) -> None {
with open(file_name, "r") as f {
css = f.read();
st.markdown(f"<style>{css}</style>", unsafe_allow_html=True);
}
}

'''Load custom JS for Streamlit app'''
can icon(icon_name: str) -> None {
st.markdown(f"<i class='material-icons'>{icon_name}</i>", unsafe_allow_html=True);
}

'''Initialize a Streamlit page with custom title and favicon'''
can initPage(page_title: str) -> None {
dir_root = os.path.dirname(os.path.abspath(__file__));
favicon = Image.open(os.path.join(dir_root, "../assets/favicon.png"));
st.set_page_config(page_title=page_title, page_icon=favicon);
local_css(os.path.join(dir_root, "../assets/style.css"));

# insert header brand with logo and link to website
with open(os.path.join(dir_root, "../assets/theme.html")) as f {
st.components.v1.html(f.read(), height=80);
}
st.header(page_title);
}

'''Add a footer to the Streamlit app'''
can footer {
dir_root = os.path.dirname(os.path.abspath(__file__));
local_css(os.path.join(dir_root, "../assets/footer.css"));
Expand Down

0 comments on commit 9802400

Please sign in to comment.