Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -14,9 +14,12 @@ from dotenv import load_dotenv # To load environment variables from .env file
|
|
14 |
# Load environment variables
|
15 |
load_dotenv()
|
16 |
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
20 |
|
21 |
# Resize the image if it exceeds the max dimension
|
22 |
def resize_image(image, max_dimension):
|
|
|
14 |
# Load environment variables
|
15 |
load_dotenv()
|
16 |
|
17 |
+
load_dotenv()
|
18 |
+
|
19 |
+
openai_api_key = os.getenv('OPENAI_API_KE')
|
20 |
+
client = OpenAI(
|
21 |
+
api_key=openai_api_key) # Fix the key to 'OPENAI_API_KEY'
|
22 |
+
|
23 |
|
24 |
# Resize the image if it exceeds the max dimension
|
25 |
def resize_image(image, max_dimension):
|