#streamlit run your_script.py
import streamlit as st
import os
import sys
from pathlib import Path
st.set_page_config(
page_title="F1 Steering Angle Model",
page_icon="https://img.icons8.com/external-soft-fill-juicy-fish/60/external-formula-vehicle-mechanics-soft-fill-soft-fill-juicy-fish.png",
initial_sidebar_state="expanded",
layout="wide"
)
from utils.helper import BASE_DIR,metrics_page
if "visited" not in st.session_state:
st.session_state["visited"] = True
try:
metrics_page.update_one({"page": "inicio"}, {"$inc": {"visits": 1}})
except:
st.warning("MongoDB client not connected.")
hide_decoration_bar_style = '''
'''
logo_style = '''
'''
#sst.markdown(hide_decoration_bar_style, unsafe_allow_html=True)logo_style
st.markdown(logo_style, unsafe_allow_html=True)
#st.markdown("
",unsafe_allow_html=True)
with st.sidebar:
st.markdown("
The model is trained with images from -180° to 180°, for the moment may not accurately predict angles beyond 180°. Poor or high-intensity lighting may affect data accuracy.
", unsafe_allow_html=True) st.caption("""**Usage**:""") st.markdown("Free-tier server resources are limited, so the page may be slow or crash with large files. To run it locally, feel free to fork/clone the project or download the desktop app.
", unsafe_allow_html=True) st.markdown("Any feedback is welcome.
", unsafe_allow_html=True) st.markdown("", unsafe_allow_html=True) st.markdown("Click Assets then download .exe
", unsafe_allow_html=True) st.link_button("Download", "https://github.com/danielsaed/F1-steering-angle-model/releases",type="secondary",use_container_width=True) st.markdown("", unsafe_allow_html=True) st.markdown("For research/educational purposes only
", unsafe_allow_html=True) pages = st.navigation({ "Steering Angle Model": [ st.Page(Path(BASE_DIR) / "navigation" / "steering-angle.py", title="Use Model"), st.Page(Path(BASE_DIR) / "navigation" / "soon.py", title="Historical Steering Data Base"), ],}) pages.run()