Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| from pages import anthropic_models, huggingface_models | |
| from utils import set_page_config, display_about_token_counting, display_footer | |
| def main(): | |
| """ | |
| Main entry point for the Streamlit application. | |
| """ | |
| set_page_config() | |
| st.title("π LLM Token Counter") | |
| st.markdown("This app counts tokens for different language models based on your input text.") | |
| # Tabs for model provider selection | |
| provider_tab = st.tabs(["Anthropic Models", "Hugging Face Models"]) | |
| with provider_tab[0]: # Anthropic Models | |
| anthropic_models.display() | |
| with provider_tab[1]: # Hugging Face Models | |
| huggingface_models.display() | |
| # Additional information | |
| display_about_token_counting() | |
| # Footer | |
| display_footer() | |
| if __name__ == "__main__": | |
| main() | |