gabrielaltay commited on
Commit
c027a07
·
verified ·
1 Parent(s): 064718a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -95,7 +95,7 @@ with st.sidebar:
95
 
96
  st.header("Configuration")
97
 
98
- openai_api_key = st.text_input(
99
  label = "OpenAI API Key:",
100
  help="Required for OpenAI Models",
101
  type="password",
@@ -143,7 +143,7 @@ if prompt := st.chat_input("How can I help you understand this bill?"):
143
  st.warning("Enter API key to chat")
144
  st.stop()
145
  else:
146
- client = OpenAI(api_key=openai_api_key)
147
 
148
  with st.chat_message("user"):
149
  st.markdown(prompt)
 
95
 
96
  st.header("Configuration")
97
 
98
+ st.text_input(
99
  label = "OpenAI API Key:",
100
  help="Required for OpenAI Models",
101
  type="password",
 
143
  st.warning("Enter API key to chat")
144
  st.stop()
145
  else:
146
+ client = OpenAI(api_key=st.session_state["openai_api_key"])
147
 
148
  with st.chat_message("user"):
149
  st.markdown(prompt)