Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ import base64
|
|
12 |
# Function to encode the image
|
13 |
def encode_image(image_path):
|
14 |
with open(image_path, "rb") as image_file:
|
15 |
-
|
16 |
|
17 |
|
18 |
openai_api_key = os.environ.get('openai_api_key')
|
|
|
12 |
# Function to encode the image
|
13 |
def encode_image(image_path):
|
14 |
with open(image_path, "rb") as image_file:
|
15 |
+
return base64.b64encode(image_file.read()).decode('utf-8')
|
16 |
|
17 |
|
18 |
openai_api_key = os.environ.get('openai_api_key')
|