Update app.py
Browse files
app.py
CHANGED
|
@@ -36,13 +36,13 @@ def main():
|
|
| 36 |
st.markdown("Go to [this page](https://openai.com/pricing) to get an OpenAI API key.")
|
| 37 |
# text input to ask for openai api key
|
| 38 |
# then hide the input
|
| 39 |
-
|
| 40 |
|
| 41 |
# load the api key from the .env file
|
| 42 |
load_dotenv()
|
| 43 |
|
| 44 |
# inform the user that the api key is loaded
|
| 45 |
-
if
|
| 46 |
st.write("OpenAI API key loaded")
|
| 47 |
|
| 48 |
# inform user that the model being used is the turbo model
|
|
|
|
| 36 |
st.markdown("Go to [this page](https://openai.com/pricing) to get an OpenAI API key.")
|
| 37 |
# text input to ask for openai api key
|
| 38 |
# then hide the input
|
| 39 |
+
OPENAI_API_KEY= st.text_input("Enter your OpenAI API key", type="password")
|
| 40 |
|
| 41 |
# load the api key from the .env file
|
| 42 |
load_dotenv()
|
| 43 |
|
| 44 |
# inform the user that the api key is loaded
|
| 45 |
+
if OPENAI_API_KEY is not None and OPENAI_API_KEY != "":
|
| 46 |
st.write("OpenAI API key loaded")
|
| 47 |
|
| 48 |
# inform user that the model being used is the turbo model
|