Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,15 @@
|
|
1 |
-
import os
|
2 |
import openai
|
|
|
|
|
|
|
3 |
api_key = os.environ.get('OPENAI_API_KEY')
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
import numpy as np
|
7 |
from PIL import Image
|
|
|
|
|
1 |
import openai
|
2 |
+
import os
|
3 |
+
|
4 |
+
# Access repository secret
|
5 |
api_key = os.environ.get('OPENAI_API_KEY')
|
6 |
+
|
7 |
+
# Check if the secret is available
|
8 |
+
if api_key:
|
9 |
+
st.write("API Key:", api_key)
|
10 |
+
else:
|
11 |
+
st.write("API Key not found.")
|
12 |
+
|
13 |
|
14 |
import numpy as np
|
15 |
from PIL import Image
|