Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
import streamlit as st
|
2 |
import openai
|
3 |
import random
|
|
|
4 |
|
5 |
|
6 |
# Fetch the OpenAI API key from Streamlit secrets
|
7 |
-
OPENAI_API_KEY = st.secrets["OPENAI_API_KEY"]
|
|
|
8 |
# Retrieve the OpenAI API Key from secrets
|
9 |
openai.api_key = st.secrets["OPENAI_API_KEY"]
|
10 |
|
|
|
1 |
import streamlit as st
|
2 |
import openai
|
3 |
import random
|
4 |
+
import os
|
5 |
|
6 |
|
7 |
# Fetch the OpenAI API key from Streamlit secrets
|
8 |
+
# OPENAI_API_KEY = st.secrets["OPENAI_API_KEY"]
|
9 |
+
os.environ["OPENAI_API_KEY"] = st.secrets["OPENAI_API_KEY"]
|
10 |
# Retrieve the OpenAI API Key from secrets
|
11 |
openai.api_key = st.secrets["OPENAI_API_KEY"]
|
12 |
|