Spestly commited on
Commit
92d7276
·
verified ·
1 Parent(s): b3231d0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -0
app.py CHANGED
@@ -6,6 +6,7 @@ st.set_page_config(page_title="Cohere Chat", layout="wide")
6
 
7
  AI_PFP = "media/pfps/cohere-pfp.png"
8
  USER_PFP = "media/pfps/user-pfp.jpg"
 
9
 
10
  if not os.path.exists(AI_PFP) or not os.path.exists(USER_PFP):
11
  st.error("Missing profile pictures in media/pfps directory")
@@ -70,6 +71,21 @@ model_info = {
70
  }
71
 
72
  with st.sidebar:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  st.title("Settings")
74
  api_key = st.text_input("Cohere API Key", type="password")
75
  selected_model = st.selectbox("Model", options=list(model_info.keys()))
 
6
 
7
  AI_PFP = "media/pfps/cohere-pfp.png"
8
  USER_PFP = "media/pfps/user-pfp.jpg"
9
+ BANNER = "media/banner.png"
10
 
11
  if not os.path.exists(AI_PFP) or not os.path.exists(USER_PFP):
12
  st.error("Missing profile pictures in media/pfps directory")
 
71
  }
72
 
73
  with st.sidebar:
74
+ st.image(BANNER, use_column_width=True)
75
+ st.title("Settings")
76
+ theme = st.selectbox("Theme", ["Light", "Dark"], index=0)
77
+ if theme == "Dark":
78
+ st.markdown(
79
+ """
80
+ <style>
81
+ /* Streamlit dark mode override */
82
+ .css-18ni7ap, .css-1d391kg, .css-12oz5g7 { background-color: #2e2e2e !important; color: #f0f0f0 !important; }
83
+ body { background-color: #1e1e1e !important; color: #f0f0f0 !important; }
84
+ </style>
85
+ """, unsafe_allow_html=True
86
+ )
87
+ st.markdown("# Cohere Labs")
88
+ st.markdown("Hugging Face 🤗 Community UI")
89
  st.title("Settings")
90
  api_key = st.text_input("Cohere API Key", type="password")
91
  selected_model = st.selectbox("Model", options=list(model_info.keys()))