Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ def process_text(text_input, unit):
|
|
35 |
|
36 |
def encode_image_to_base64(image_input):
|
37 |
buffered = io.BytesIO()
|
38 |
-
|
39 |
img_str = base64.b64encode(buffered.getvalue()).decode("utf-8")
|
40 |
return img_str
|
41 |
|
|
|
35 |
|
36 |
def encode_image_to_base64(image_input):
|
37 |
buffered = io.BytesIO()
|
38 |
+
image_input.save(buffered, format="JPEG")
|
39 |
img_str = base64.b64encode(buffered.getvalue()).decode("utf-8")
|
40 |
return img_str
|
41 |
|