-
Notifications
You must be signed in to change notification settings - Fork 11
/
app.py
36 lines (25 loc) · 830 Bytes
/
app.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
# BioChatter Light: lightweight pure Python frontend for BioChatter
app_name = "biochatter-light"
import os
import streamlit as st
from components.logic import main_logic
st.set_page_config(
page_title=os.getenv("BIOCHATTER_LIGHT_TITLE") or "BioChatter Light",
page_icon="💬",
layout="wide",
initial_sidebar_state="expanded",
)
ss = st.session_state
if os.getenv("BIOCHATTER_LIGHT_HEADER"):
st.markdown(f'# {os.getenv("BIOCHATTER_LIGHT_HEADER")}')
if os.getenv("BIOCHATTER_LIGHT_SUBHEADER"):
st.markdown(f'### {os.getenv("BIOCHATTER_LIGHT_SUBHEADER")}')
def local_css(file_name):
"""
Load local CSS file.
"""
with open(file_name) as f:
st.markdown(f"<style>{f.read()}</style>", unsafe_allow_html=True)
local_css("style.css")
if __name__ == "__main__":
main_logic()