Nyanfa commited on
Commit
bb4bb5d
·
verified ·
1 Parent(s): dc09362

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -281,7 +281,7 @@ with st.sidebar:
281
  model = st.selectbox("Model", options=model_list, index=0)
282
  system_prompt = st.text_area("System prompt", height=200)
283
 
284
- st.session_state.prefill = st.text_area("Prefill", height=50, value=st.session_state.prefill, placeholder="It only works well with the Claude models.",
285
  help="You can prefill the assistant's responses. You can also directly type the @prefill command into the chat field (e.g., \"Write a novel. @prefill Sure! I'd be happy to write a novel for you.\")")
286
  save_prefill = st.toggle("Save the @prefill command input in the sidebar", value=True)
287
 
@@ -368,18 +368,18 @@ if selected_font != "Default":
368
  st.markdown(f'<style>body * {{ font-family: "{font_options[selected_font]}", serif !important; }}</style>', unsafe_allow_html=True)
369
 
370
  # Change font size
371
- st.markdown(f'<style>[data-testid="stChatMessageContent"] .st-emotion-cache-cnbvxy p{{font-size: {st.session_state.font_size}px;}}</style>', unsafe_allow_html=True)
372
 
373
  # Change icon size
374
  # (CSS element names may be subject to change.)
375
  # (Contributor: ★31 >>538)
376
  AVATAR_SIZE_STYLE = f"""
377
  <style>
378
- [data-testid="chatAvatarIcon-user"] {{
379
  width: {st.session_state.avatar_size}rem;
380
  height: {st.session_state.avatar_size}rem;
381
  }}
382
- [data-testid="chatAvatarIcon-assistant"] {{
383
  width: {st.session_state.avatar_size}rem;
384
  height: {st.session_state.avatar_size}rem;
385
  }}
 
281
  model = st.selectbox("Model", options=model_list, index=0)
282
  system_prompt = st.text_area("System prompt", height=200)
283
 
284
+ st.session_state.prefill = st.text_area("Prefill", height=68, value=st.session_state.prefill, placeholder="It only works well with the Claude models.",
285
  help="You can prefill the assistant's responses. You can also directly type the @prefill command into the chat field (e.g., \"Write a novel. @prefill Sure! I'd be happy to write a novel for you.\")")
286
  save_prefill = st.toggle("Save the @prefill command input in the sidebar", value=True)
287
 
 
368
  st.markdown(f'<style>body * {{ font-family: "{font_options[selected_font]}", serif !important; }}</style>', unsafe_allow_html=True)
369
 
370
  # Change font size
371
+ st.markdown(f'<style>[data-testid="stChatMessageContent"] .st-emotion-cache-kj6hex p{{font-size: {st.session_state.font_size}px;}}</style>', unsafe_allow_html=True)
372
 
373
  # Change icon size
374
  # (CSS element names may be subject to change.)
375
  # (Contributor: ★31 >>538)
376
  AVATAR_SIZE_STYLE = f"""
377
  <style>
378
+ [data-testid="stChatMessageAvatarUser"] {{
379
  width: {st.session_state.avatar_size}rem;
380
  height: {st.session_state.avatar_size}rem;
381
  }}
382
+ [data-testid="stChatMessageAvatarAssistant"] {{
383
  width: {st.session_state.avatar_size}rem;
384
  height: {st.session_state.avatar_size}rem;
385
  }}