Altr is a simple script that generates and places alternate text for images in a static website. It's goal is to improve SEO (search engine optimization) and accessibility for websites with many images.
-
Install the dependencies for our code using Conda. You may need to adjust the environment YAML file depending on your setup.
conda env create -f environment.yaml
-
Install the CLIP repository
pip install git+https://github.com/openai/CLIP.git
-
Download pretrained weights (conceptual_weights.pt) and place them in the weights directory. You can find the COCO and Conceptual Captions pretrained models on Google Drive.
-
Launch your environment with
conda activate understanding
orsource activate understanding
-
Place files to change in
input
folder -
Run
python main
to generate captions for files. New files will be placed inoutput
folder.