Download src/Streamlit_Magic_Sheet/components/header.py from tushar27/Streamlit-Magic-Cheat-Sheet: direct link, hf CLI and curl.
- Browser
- Download file 1.93 kB
-
https://huggingface.co/spaces/tushar27/Streamlit-Magic-Cheat-Sheet/resolve/main/src/Streamlit_Magic_Sheet/components/header.py
- Command line
-
hf download hf://spaces/tushar27/Streamlit-Magic-Cheat-Sheet/src/Streamlit_Magic_Sheet/components/header.py
-
curl -L -o header.py https://huggingface.co/spaces/tushar27/Streamlit-Magic-Cheat-Sheet/resolve/main/src/Streamlit_Magic_Sheet/components/header.py
1.93 kB
| #Authot github.com/tushar2704 | |
| ############################################################################################################## | |
| #Importing required library | |
| ############################################################################################################## | |
| import streamlit as st | |
| import sys | |
| from pathlib import Path | |
| script_dir = Path(__file__).resolve().parent | |
| project_root = script_dir.parent | |
| sys.path.append(str(project_root)) | |
| ####################################################################################################### | |
| #Importing from SRC | |
| ####################################################################################################### | |
| from src.Streamlit_Magic_Sheet.components.header import * | |
| from src.Streamlit_Magic_Sheet.components.body import * | |
| from src.Streamlit_Magic_Sheet.components.navigation import * | |
| from src.Streamlit_Magic_Sheet.components.siderbar import * | |
| from src.Streamlit_Magic_Sheet.components.metrics import * | |
| from src.Streamlit_Magic_Sheet.components.charts import * | |
| from src.Streamlit_Magic_Sheet.components.test import * | |
| from src.Streamlit_Magic_Sheet.components.elements import * | |
| ####################################################################################################### | |
| ############################################################################################################## | |
| #Application Title functions | |
| ############################################################################################################## | |
| def main_header(title=None, header=None, subheader=None, markdown=None, write=None, code=None): | |
| ''' | |
| Displaying Main Header conponents | |
| ''' | |
| if title: | |
| st.title(title) | |
| if header: | |
| st.header(header) | |
| if subheader: | |
| st.subheader(subheader) | |
| if markdown: | |
| st.markdown(markdown) | |
| if write: | |
| st.write(write) | |
| if code: | |
| st.code(code) | |