Streamlit app to calculate and compare the costs of various LLM APIs based on input parameters.
- Fetches up-to-date pricing data from docsbot.ai
- Allows user input for tokens and API calls
- Filters results by provider
- Calculates total and relative costs
- Visualizes costs with an interactive bar chart
- pandas
- plotly
- requests
- beautifulsoup4
- streamlit
Fetches and parses LLM API cost data from the website. Uses caching to reduce API calls.
Loads and preprocesses the LLM API cost data into a pandas DataFrame.
Calculates total and relative costs for each model based on user inputs.
Creates a horizontal bar chart visualizing total costs by model.
- Load and preprocess data
- Display user input sidebar for parameters and filtering
- Calculate costs based on user inputs
- Display results in a table and chart
Run the application with:
streamlit run app.py