Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,32 +36,21 @@ s3 = boto3.client(
|
|
| 36 |
aws_secret_access_key=aws_secret_access_key
|
| 37 |
)
|
| 38 |
|
| 39 |
-
# -------------------------
|
| 40 |
-
|
| 41 |
-
with open(path, "rb") as f:
|
| 42 |
-
data = f.read()
|
| 43 |
-
return base64.b64encode(data).decode()
|
| 44 |
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
-
|
| 48 |
-
st.markdown(f"""
|
| 49 |
-
<div style="
|
| 50 |
-
display: flex;
|
| 51 |
-
align-items: center;
|
| 52 |
-
justify-content: center;
|
| 53 |
-
margin-top: 0px;
|
| 54 |
-
margin-bottom: 5px;
|
| 55 |
-
gap: 15px;
|
| 56 |
-
">
|
| 57 |
-
<img src="data:image/png;base64,{logo_base64}" style="width: 250px; height: auto; margin-top: 0;">
|
| 58 |
-
<div style="text-align: left; margin-top: 0;">
|
| 59 |
-
<h1 style="color: #FF4500; margin: 0; font-size: 2rem;">🔥 Projet Incendies</h1>
|
| 60 |
-
<p style="font-size:16px; color: gray; margin: 0;">Analyse et prédiction des feux de forêts</p>
|
| 61 |
-
</div>
|
| 62 |
-
</div>
|
| 63 |
-
<hr style="margin-top: 5px; margin-bottom: 10px;">
|
| 64 |
-
""", unsafe_allow_html=True)
|
| 65 |
|
| 66 |
#-------------------------------------------------------- Streamlit page config ---------------------------------------------------
|
| 67 |
st.set_page_config(page_title="Projet Incendies", page_icon="🔥", layout="wide")
|
|
|
|
| 36 |
aws_secret_access_key=aws_secret_access_key
|
| 37 |
)
|
| 38 |
|
| 39 |
+
# ------------------------- Header compact -------------------------
|
| 40 |
+
col1, col2, col3 = st.columns([1, 2, 1])
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
+
with col2:
|
| 43 |
+
st.image("images/logo.png", width=300)
|
| 44 |
+
st.markdown(
|
| 45 |
+
"<h1 style='text-align: center; color: #FF4500; margin:0;'>🔥 Projet Incendies</h1>",
|
| 46 |
+
unsafe_allow_html=True
|
| 47 |
+
)
|
| 48 |
+
st.markdown(
|
| 49 |
+
"<p style='text-align: center; font-size:16px; color:gray; margin:0;'>Analyse et prédiction des feux de forêts</p>",
|
| 50 |
+
unsafe_allow_html=True
|
| 51 |
+
)
|
| 52 |
|
| 53 |
+
st.markdown("<hr style='margin:5px 0 10px 0;'>", unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
#-------------------------------------------------------- Streamlit page config ---------------------------------------------------
|
| 56 |
st.set_page_config(page_title="Projet Incendies", page_icon="🔥", layout="wide")
|