intent-classifier / app /streamlit_app.py
Prince012's picture
fix: sys.path for app module resolution in HF Spaces
7fa2eda
Raw
History Blame Contribute Delete
715 Bytes
import sys
from pathlib import Path
# ensure project root is on path so 'app' resolves correctly
root = Path(__file__).parent.parent
if str(root) not in sys.path:
sys.path.insert(0, str(root))
import streamlit as st
st.set_page_config(
page_title="Intent Classifier",
page_icon=":material/psychology:",
layout="wide",
)
predict_page = st.Page("pages/predict.py", title="Predict", icon=":material/chat:")
compare_page = st.Page("pages/compare.py", title="Compare Models", icon=":material/bar_chart:")
monitoring_page = st.Page("pages/monitoring.py", title="Monitoring", icon=":material/monitoring:")
pg = st.navigation([predict_page, compare_page, monitoring_page])
pg.run()