The Conversion Compass is a Streamlit web application designed to make unit conversions easy and accessible for everyone. Whether you're a student, professional, or just need to quickly convert between units, this tool provides a user-friendly interface and accurate results. It handles a wide variety of unit types, including length, mass, temperature, area, digital storage, speed, time, pressure, volume, and power. The app also features an AI assistant (Beta) powered by Google's Gemini model to help with more complex conversion questions and calculations.
- Wide Range of Unit Types: Supports conversions for length, mass, temperature, area, digital storage, speed, time, pressure, volume, and power.
- Accurate Conversions: Uses precise conversion factors for reliable results.
- User-Friendly Interface: Easy to navigate and use, even for those unfamiliar with unit conversions.
- AI Assistant (Beta): Powered by Google's Gemini model, the AI assistant can answer questions related to unit conversions and perform calculations.
- Clear Conversion Guidance: Provides explanations of the formulas used in the conversions.
- Dark Theme: A visually appealing dark theme for comfortable use in any environment.
- Responsive Design: Works well on various screen sizes (desktop, tablet, mobile).
- Select a Category: Choose the type of unit you want to convert (e.g., Length, Mass, Temperature) from the "Choose a Category" dropdown.
- Select Units: Specify the unit to convert from in the "Convert From" dropdown and the unit to convert to in the "Convert To" dropdown.
- Enter Value: Enter the numerical value you want to convert in the input field.
- Click "Chart the Course!": Press the button to perform the conversion. The result and the conversion formula will be displayed.
- AI Assistant: Use the AI assistant at the bottom of the page to ask more complex questions or get help with specific conversions.
-
Clone the repository:
git clone https://github.com/your-github-username/your-repo-name.git cd your-repo-name -
Create a virtual environment (recommended):
python3 -m venv venv source venv/bin/activate # On Linux/macOS venv\Scripts\activate # On Windows
-
Install dependencies:
pip install -r requirements.txt
-
Set up your Google Gemini API key:
- Obtain an API key from Google AI Studio.
- Important: Do not commit your API key directly to the repository.
- Streamlit: Set the API key as a Streamlit secret. Go to your Streamlit Cloud app's settings and add a secret named
"GEMINI_API_KEY"with your API key as the value.
-
Run the Streamlit app:
streamlit run your_app_name.py
Contributions are welcome! If you'd like to contribute to the project, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them with clear, descriptive commit messages.
- Submit a pull request.
Please ensure that your code adheres to the project's coding style and includes appropriate tests.
This project is licensed under the MIT License - see the LICENSE file for details.
This application was created by Muhammad Anas Jamshaid.
- Streamlit for providing the framework for building the web application.
- Google AI for the Gemini model used in the AI assistant.
- Icons8 for providing the social media icons.
If you have any questions or suggestions, feel free to contact me through my GitHub or LinkedIn profiles.