Spaces:
Paused
Paused
Download app/components/header.py from mrqadeer/email-classifier: direct link, hf CLI and curl.
- Browser
- Download file 801 Bytes
-
https://huggingface.co/spaces/mrqadeer/email-classifier/resolve/main/app/components/header.py
- Command line
-
hf download hf://spaces/mrqadeer/email-classifier/app/components/header.py
-
curl -L -o header.py https://huggingface.co/spaces/mrqadeer/email-classifier/resolve/main/app/components/header.py
801 Bytes
| import streamlit as st | |
| from typing import Optional | |
| from app.utils.ui_elements import load_css | |
| from app.config import AppConfig | |
| def render(config: Optional[AppConfig] = None) -> None: | |
| """Render the header component. | |
| Args: | |
| config: Optional application configuration | |
| """ | |
| # Load custom CSS | |
| load_css() | |
| # Get app title from config or use default | |
| app_title = config.APP_NAME if config else "Email Spam Classifier" | |
| # Header with logo and title | |
| col1, col2 = st.columns([1, 5]) | |
| with col1: | |
| # You can replace this with an actual logo image | |
| st.markdown("# 📧") | |
| with col2: | |
| st.markdown(f""" | |
| # {app_title} | |
| Detect unwanted spam emails with machine learning | |
| """) | |
| st.markdown("---") | |