Spaces:
Running
Running
Zhu-FaceOnLive
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from PIL import Image
|
|
8 |
count = 0
|
9 |
def image_to_base64(image):
|
10 |
buffered = BytesIO()
|
11 |
-
image.save(buffered, format="
|
12 |
return base64.b64encode(buffered.getvalue()).decode('utf-8')
|
13 |
|
14 |
def base64_to_image(base64_str):
|
|
|
8 |
count = 0
|
9 |
def image_to_base64(image):
|
10 |
buffered = BytesIO()
|
11 |
+
image.save(buffered, format="JPEG", quality=90)
|
12 |
return base64.b64encode(buffered.getvalue()).decode('utf-8')
|
13 |
|
14 |
def base64_to_image(base64_str):
|