Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,12 @@ logging.basicConfig(
|
|
15 |
format="%(asctime)s [%(levelname)s] [%(filename)s:%(lineno)d] %(message)s",
|
16 |
)
|
17 |
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
# if we are running in Docker
|
21 |
if os.environ.get("dockerrun") == "yes":
|
|
|
15 |
format="%(asctime)s [%(levelname)s] [%(filename)s:%(lineno)d] %(message)s",
|
16 |
)
|
17 |
|
18 |
+
@st.cache
|
19 |
+
def init_openai_settings():
|
20 |
+
openai.api_key = os.getenv("openai_key")
|
21 |
+
|
22 |
+
my_api_key = openai.api_key
|
23 |
+
#"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" # 在这里输入你的 API 密钥
|
24 |
|
25 |
# if we are running in Docker
|
26 |
if os.environ.get("dockerrun") == "yes":
|