An image tagger using Groq. Use GroqChat to help tag your images into a json file.
Go to Groq. Go to the dev console and make an API Key. Create a .env file in the root of the repository like so, replacing the XXXXX with your value.
GROQ_API_KEY=XXXXX
Run the following from the root of the repository to get a functional conda environment.
conda env create -f environment.yaml
Please note that this is not perfect. Groq sometimes returns invalid data.
python main.py -i "./tests/images/800px-Another_Day_in_NYC_(2539547867).jpg" "https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Interior_Galeria_Arte_Nacional_%28Caracas%29.jpg/800px-Interior_Galeria_Arte_Nacional_%28Caracas%29.jpg?20071010223618"
Example (output.json)
{
"./tests/images/800px-Another_Day_in_NYC_(2539547867).jpg": {
"tags": [
"Flowers",
"Nature",
"Pink",
"Potted",
"Green",
"Plant"
],
"categories": [
"Gardening",
"Flowers"
]
},
"https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Interior_Galeria_Arte_Nacional_%28Caracas%29.jpg/800px-Interior_Galeria_Arte_Nacional_%28Caracas%29.jpg?20071010223618": {
"tags": [
"fountain",
"art",
"sculpture",
"relax",
"vietnam"
],
"categories": [
"Museum",
"Culture"
]
}
}
python main.py -i ./tests/images
All images were source from Wikimedia commons.
Run the following from the root
tox