Demosthene-OR commited on
Commit
cd7e290
·
1 Parent(s): 512491e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -22
app.py CHANGED
@@ -86,11 +86,11 @@ def run():
86
  "assets/value_props_logo.png",
87
  width=270,
88
  )
89
- # with st.sidebar.expander(tr("Développez moi")):
90
- # st.markdown(tr("""
91
- # Cette application vous permet de tester les futures fonctionnalités de la plateforme Value Props, et plus particulièrement le «Sales Coaching».
92
- # Amusez vous bien !
93
- # """))
94
  with st.sidebar:
95
 
96
  tab_name = option_menu(None, list(TABS.keys()),
@@ -105,25 +105,25 @@ def run():
105
  st.sidebar.markdown("---")
106
  st.sidebar.markdown(f"## {tr(config.PROMOTION)}")
107
 
108
- # st.sidebar.markdown("### "tr("Auteur:"))
109
- # for member in config.TEAM_MEMBERS:
110
- # st.sidebar.markdown(member.sidebar_markdown(), unsafe_allow_html=True)
111
 
112
- # with st.sidebar:
113
- # st.write("")
114
- # llm_choice = st.selectbox(tr("Modèle :"),["Mistral large","OpenAI 3.5","OpenAI 4o"], label_visibility="visible")
115
- # if (llm_choice == "OpenAI 3.5") : st.session_state.model = "gpt-3.5-turbo"
116
- # elif (llm_choice == "OpenAI 4o") : st.session_state.model = "gpt-4o"
117
- # else: st.session_state.model = "mistral-large-latest"
118
 
119
- # if (llm_choice in ["OpenAI 3.5","OpenAI 4o"]) and ('OPENAI_API_KEY' not in st.session_state):
120
- # # Set OpenAI API key
121
- # st.sidebar.subheader("OpenAI API Key")
122
- # openai_api_key = st.sidebar.text_input("Enter your OpenAI API Key:", type='password')
123
- # if openai_api_key:
124
- # os.environ['OPENAI_API_KEY'] = openai_api_key
125
- # st.session_state['OPENAI_API_KEY'] = openai_api_key
126
- # st.sidebar.success("OpenAI API Key set successfully.")
127
 
128
  st.session_state.model = "mistral-large-latest"
129
  with st.sidebar:
 
86
  "assets/value_props_logo.png",
87
  width=270,
88
  )
89
+ with st.sidebar.expander(tr("Développez moi")):
90
+ st.markdown(tr("""
91
+ Cette application vous permet de tester les futures fonctionnalités de la plateforme Value Props, et plus particulièrement le «Sales Coaching».
92
+ Amusez vous bien !
93
+ """))
94
  with st.sidebar:
95
 
96
  tab_name = option_menu(None, list(TABS.keys()),
 
105
  st.sidebar.markdown("---")
106
  st.sidebar.markdown(f"## {tr(config.PROMOTION)}")
107
 
108
+ st.sidebar.markdown("### "+tr("Auteur:"))
109
+ for member in config.TEAM_MEMBERS:
110
+ st.sidebar.markdown(member.sidebar_markdown(), unsafe_allow_html=True)
111
 
112
+ with st.sidebar:
113
+ st.write("")
114
+ llm_choice = st.selectbox(tr("Modèle :"),["Mistral large","OpenAI 3.5","OpenAI 4o"], label_visibility="visible")
115
+ if (llm_choice == "OpenAI 3.5") : st.session_state.model = "gpt-3.5-turbo"
116
+ elif (llm_choice == "OpenAI 4o") : st.session_state.model = "gpt-4o"
117
+ else: st.session_state.model = "mistral-large-latest"
118
 
119
+ if (llm_choice in ["OpenAI 3.5","OpenAI 4o"]) and ('OPENAI_API_KEY' not in st.session_state):
120
+ # Set OpenAI API key
121
+ st.sidebar.subheader("OpenAI API Key")
122
+ openai_api_key = st.sidebar.text_input("Enter your OpenAI API Key:", type='password')
123
+ if openai_api_key:
124
+ os.environ['OPENAI_API_KEY'] = openai_api_key
125
+ st.session_state['OPENAI_API_KEY'] = openai_api_key
126
+ st.sidebar.success("OpenAI API Key set successfully.")
127
 
128
  st.session_state.model = "mistral-large-latest"
129
  with st.sidebar: