Image to base64
Browse files- area_measurement.py +3 -1
area_measurement.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from pathlib import Path
|
| 3 |
from streamlit import session_state as sess
|
|
|
|
| 4 |
|
| 5 |
from utils import raw_image, overlay_mask_on_image, image_to_file_path, AreaModel
|
| 6 |
|
|
@@ -67,10 +68,11 @@ for i, col in enumerate(cols):
|
|
| 67 |
st.button("Example "+str(i+1), on_click=set_example(i))
|
| 68 |
st.image(example_imgs[i], caption='Example ' + str(i+1), use_column_width=True)
|
| 69 |
|
|
|
|
| 70 |
|
| 71 |
footer_html = """<div style='text-align: center;'>
|
| 72 |
<p><img src="./app/static/img/EurovaLogo.png" height=100 alt="EUROVA logo"/>
|
| 73 |
-
<p>Developed with ❤️ at <a href="https://iiia.csic.es"><img
|
| 74 |
<p><img src="./app/static/img/MSCA.jpg" height=30 alt="MSCA logo"/> Funded by the European Union Horizon 2020 research and innovation programme under the Marie Sklodowka-Curie grant agreement 860960
|
| 75 |
</div>"""
|
| 76 |
st.markdown(footer_html, unsafe_allow_html=True)
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from pathlib import Path
|
| 3 |
from streamlit import session_state as sess
|
| 4 |
+
import base64
|
| 5 |
|
| 6 |
from utils import raw_image, overlay_mask_on_image, image_to_file_path, AreaModel
|
| 7 |
|
|
|
|
| 68 |
st.button("Example "+str(i+1), on_click=set_example(i))
|
| 69 |
st.image(example_imgs[i], caption='Example ' + str(i+1), use_column_width=True)
|
| 70 |
|
| 71 |
+
LOGO_IIIA_IMAGE = "static/img/iiia-logo.png"
|
| 72 |
|
| 73 |
footer_html = """<div style='text-align: center;'>
|
| 74 |
<p><img src="./app/static/img/EurovaLogo.png" height=100 alt="EUROVA logo"/>
|
| 75 |
+
<p>Developed with ❤️ at <a href="https://iiia.csic.es"><img src="data:image/png;base64,{base64.b64encode(open(LOGO_IIIA_IMAGE, "rb").read()).decode()}"> height=30 alt="IIIA logo"/> IIIA - CSIC</a> by <a href="https://www.iiia.csic.es/~cerquide">Jesus Cerquides</a>, Giorgios Athanasiou and Josep LLuís Arcos </p>
|
| 76 |
<p><img src="./app/static/img/MSCA.jpg" height=30 alt="MSCA logo"/> Funded by the European Union Horizon 2020 research and innovation programme under the Marie Sklodowka-Curie grant agreement 860960
|
| 77 |
</div>"""
|
| 78 |
st.markdown(footer_html, unsafe_allow_html=True)
|