kheopss commited on
Commit
a868541
·
verified ·
1 Parent(s): fabc2f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
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
- # Get the OpenAI API key from the environment variables
18
- openai_api_key = os.getenv('OPENAI_API_KEY') # Fix the key to 'OPENAI_API_KEY'
19
- client = OpenAI(api_key=openai_api_key)
 
 
 
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):