SnapCode is a Streamlit-based web application that utilizes the Gemini API for AI-powered processing and converts images into base64-encoded byte strings.
- Gemini API Integration: Uses Google's Gemini API for AI-powered functionalities.
- Image Conversion: Upload an image and convert it to base64-encoded bytes.
- Streamlit UI: A user-friendly web interface for seamless interaction.
To get started, clone the repository and install the necessary dependencies.
# Clone the repository
git clone https://github.com/yourusername/snapcode.git
cd snapcode
# Install dependencies
pip install -r requirements.txt
Ensure you have access to the Gemini API and set up your API key in an environment variable or directly in the script (not recommended for security reasons).
export GEMINI_API_KEY="your_api_key_here"
Run the Streamlit app using the following command:
streamlit run app.py
- Upload an image.
- Click the Convert button.
- The base64-encoded bytes will be displayed.
{
"filename": "image.png",
"base64_bytes": "iVBORw0KGgoAAAANSUhEUgAA..."
}
- Python 3.8+
- Streamlit
- Requests
- OpenAI API (Gemini API)
Contributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the MIT License.
For any questions or support, please reach out via GitHub Issues.