Spaces:
Sleeping
Sleeping
Update pages/1_Introduction.py
Browse files- pages/1_Introduction.py +5 -0
pages/1_Introduction.py
CHANGED
|
@@ -3,6 +3,11 @@ from PIL import Image
|
|
| 3 |
import base64
|
| 4 |
import io
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
# Base64 encoded image string
|
| 7 |
encoded_image = "UklGRrICBgBXRUJQVlA4IKrbBABQ9xCdASoABwAEPjEWiUOiISUmJZYbuMAGCWNsiXpgHwljA+sbSoKb/m/ZfJS/8fokeQ9+Mnxx"
|
| 8 |
|
|
|
|
| 3 |
import base64
|
| 4 |
import io
|
| 5 |
|
| 6 |
+
|
| 7 |
+
with open('path_to_your_image/A_warm_and_cozy_scene_of_a_father_sitting_with_his.png', 'rb') as img_file:
|
| 8 |
+
encoded_string = base64.b64encode(img_file.read()).decode('utf-8')
|
| 9 |
+
print(encoded_string)
|
| 10 |
+
|
| 11 |
# Base64 encoded image string
|
| 12 |
encoded_image = "UklGRrICBgBXRUJQVlA4IKrbBABQ9xCdASoABwAEPjEWiUOiISUmJZYbuMAGCWNsiXpgHwljA+sbSoKb/m/ZfJS/8fokeQ9+Mnxx"
|
| 13 |
|