Update app.py
Browse files
app.py
CHANGED
@@ -42,14 +42,14 @@ st.markdown(hide_menu_style, unsafe_allow_html=True)
|
|
42 |
import base64
|
43 |
|
44 |
|
45 |
-
@st.cache_data(
|
46 |
def get_base64_of_bin_file(bin_file):
|
47 |
with open(bin_file, 'rb') as f:
|
48 |
data = f.read()
|
49 |
return base64.b64encode(data).decode()
|
50 |
|
51 |
|
52 |
-
@st.cache_data(
|
53 |
def get_img_with_href(local_img_path, target_url, size='big'):
|
54 |
img_format = os.path.splitext(local_img_path)[-1].replace('.', '')
|
55 |
bin_str = get_base64_of_bin_file(local_img_path)
|
|
|
42 |
import base64
|
43 |
|
44 |
|
45 |
+
@st.cache_data()
|
46 |
def get_base64_of_bin_file(bin_file):
|
47 |
with open(bin_file, 'rb') as f:
|
48 |
data = f.read()
|
49 |
return base64.b64encode(data).decode()
|
50 |
|
51 |
|
52 |
+
@st.cache_data()
|
53 |
def get_img_with_href(local_img_path, target_url, size='big'):
|
54 |
img_format = os.path.splitext(local_img_path)[-1].replace('.', '')
|
55 |
bin_str = get_base64_of_bin_file(local_img_path)
|