This service provides endpoints for generating a set of max. 30 hashtags based on a given image caption.
Please refer to the proto file for more information on the service's API.
- Python 3.11.7
- I recommend to using pyenv to manage python versions
- gRPCurl
- Make (optional)
- should be pre-installed on most Unix-like systems
- Clone this repository and navigate to the root directory.
- Navigate to the
services/hashtag_service
directory. - Set up a python virtual environment with the pre-configured make command.
- Install the required dependencies to the virtual environment.
- Start the service. (optionally edit the make file to change the port or disable debug mode)
The above steps can be executed with the following commands:
git clone https://github.com/nico-i/photo-ops.git
cd photo-ops
cd services/hashtag_service
make venv
make install
make dev
If you have followed the setup instructions above, you can utilize the configured make commands to execute the example requests.
Please refer to the make file or the table below for the available make commands.
Make job | RPC | Input | Output | Duration |
---|---|---|---|---|
make req_animal |
|
{ "caption": "a cat is lying on a chair" } |
{
"hashtagsCsv": "\"Feline,pet,catsofinstagram,catlovers,catlife,chair,home,interior,animal,petsofinstagram,furryfriend,whiskers,claws,catnap,relaxation,comfort,cozy,domestic,petlife,catmom,catdad,catlady,catman,animallovers,petlovers,whimsical,funny,adorable,cute\""
} |
~20s |
make req_obj |
|
{ "caption": "a sign on a fence" } |
{
"hashtagsCsv": "\"sign,fence,handwritten,wooden,metal,public,notice,warning,information,display,marker,markerboard,signage,advertising,communication,structure,property,boundary,markerpost,landmark,markerboard,markerpost,markerboard,markerpost,markerboard,markerpost,markerboard,markerpost,markerboard,markerpost,markerboard\""
} |
~12s |
make req_human |
|
{ "caption": "a girl with a flower in her hair" } |
{
"hashtagsCsv": "flowers, beauty, hair, girl, style, fashion, floral, bloom, blossom, petals, lovely, lovelygirl, flowerpower, hairaccessories, beautyinspo, girlwithflowers, flowercrowns, hairgoals, fashionista, beautylover, lovelythings, flowerlove, hairdo, girlygirl, flowerpower, beautyful, fashionstyle, hairinspo, lovelyhair, flowercrown, beautyinspiration, girlstyle"
} |
~13s |