Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
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 |
|