Spaces:
Running
Running
brmjan2-tibyan
commited on
Commit
•
a6f12d3
1
Parent(s):
48c3d58
Update api.py
Browse files
api.py
CHANGED
@@ -110,7 +110,7 @@ def get_image(word):
|
|
110 |
# Convert image to base64
|
111 |
image_base64 = ""
|
112 |
with io.BytesIO() as buffer:
|
113 |
-
image.save(buffer, format="JPEG")
|
114 |
image_base64 = base64.b64encode(buffer.getvalue()).decode('utf-8')
|
115 |
|
116 |
return image_base64
|
@@ -118,8 +118,7 @@ def get_image(word):
|
|
118 |
|
119 |
if __name__ == "__main__":
|
120 |
pass
|
121 |
-
|
122 |
-
# print(word, meanings_examples)
|
123 |
|
124 |
|
125 |
|
|
|
110 |
# Convert image to base64
|
111 |
image_base64 = ""
|
112 |
with io.BytesIO() as buffer:
|
113 |
+
image.save(buffer, format="JPEG")
|
114 |
image_base64 = base64.b64encode(buffer.getvalue()).decode('utf-8')
|
115 |
|
116 |
return image_base64
|
|
|
118 |
|
119 |
if __name__ == "__main__":
|
120 |
pass
|
121 |
+
|
|
|
122 |
|
123 |
|
124 |
|