calmgoose commited on
Commit
48ea423
Β·
1 Parent(s): 981455c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -103,7 +103,11 @@ st.markdown("#### Have a conversaion with 1984 by George Orwell πŸ™Š")
103
 
104
  with st.sidebar:
105
  api_key = st.text_input(label = "Paste your OpenAI API key here to get started", type = "password")
106
- os.environ["OPENAI_API_KEY"] = api_key
 
 
 
 
107
 
108
  st.info("This isn't saved πŸ™ˆ")
109
 
 
103
 
104
  with st.sidebar:
105
  api_key = st.text_input(label = "Paste your OpenAI API key here to get started", type = "password")
106
+
107
+ if api_key:
108
+ os.environ["OPENAI_API_KEY"] = api_key
109
+ else:
110
+ os.environ["OPENAI_API_KEY"] = None
111
 
112
  st.info("This isn't saved πŸ™ˆ")
113