https://github.com/bwdmonkey/openai-category-classification
OpenAI vision based category classification
https://github.com/bwdmonkey/openai-category-classification
Last synced: over 1 year ago
JSON representation
OpenAI vision based category classification
- Host: GitHub
- URL: https://github.com/bwdmonkey/openai-category-classification
- Owner: bwdmonkey
- License: mit
- Created: 2025-03-04T21:35:35.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-06T04:40:32.000Z (over 1 year ago)
- Last Synced: 2025-03-06T05:29:53.565Z (over 1 year ago)
- Language: Python
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# openai-category-classification
OpenAI based document category classification
Supported Document Types:
- png, jpeg, jpg, webp, gif, bmp
- csv, xls, xlsx
Future Document Types:
- doc, docx
## Setup
1. Clone this repository
2. Create a virtual environment:
```
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. Install dependencies:
```
pip install -r requirements.txt
```
4. Set your OpenAI API key as an environment variable:
```
export OPENAI_API_KEY=your-api-key-here # On Windows: set OPENAI_API_KEY=your-api-key-here
```
## Usage
### Classify a Single Image
```bash
python -m scripts.classify single data/image.jpg
```
### Batch Classify Images in a Directory
```bash
python -m scripts.classify batch data/ --output results.json --categories "Category1" "Category2" "Category3"
```