Update app.py
Browse files
app.py
CHANGED
@@ -126,8 +126,8 @@ def create_base64_markdown_image(image_url):
|
|
126 |
|
127 |
original_width, original_height = image.size
|
128 |
|
129 |
-
new_width = original_width //
|
130 |
-
new_height = original_height //
|
131 |
|
132 |
resized_image = image.resize((new_width, new_height), Image.LANCZOS)
|
133 |
|
@@ -138,7 +138,7 @@ def create_base64_markdown_image(image_url):
|
|
138 |
|
139 |
base64_encoded = base64.b64encode(resized_image_data).decode('utf-8')
|
140 |
|
141 |
-
mime_type = 'image/png'
|
142 |
|
143 |
markdown_image_link = f""
|
144 |
logging.info(f"Created base64 markdown image link.")
|
|
|
126 |
|
127 |
original_width, original_height = image.size
|
128 |
|
129 |
+
new_width = original_width // 4
|
130 |
+
new_height = original_height // 4
|
131 |
|
132 |
resized_image = image.resize((new_width, new_height), Image.LANCZOS)
|
133 |
|
|
|
138 |
|
139 |
base64_encoded = base64.b64encode(resized_image_data).decode('utf-8')
|
140 |
|
141 |
+
mime_type = 'image/png'
|
142 |
|
143 |
markdown_image_link = f""
|
144 |
logging.info(f"Created base64 markdown image link.")
|