Skip to content

Latest commit

 

History

History
142 lines (106 loc) · 3.18 KB

README.md

File metadata and controls

142 lines (106 loc) · 3.18 KB

hashtag-service

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.

Requirements

Setup

  1. Clone this repository and navigate to the root directory.
  2. Navigate to the services/hashtag_service directory.
  3. Set up a python virtual environment with the pre-configured make command.
  4. Install the required dependencies to the virtual environment.
  5. 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

Usage

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.

Examples

Make job RPC Input Output Duration
make req_animal

get_hashtags

{ "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

get_hashtags

{ "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

get_hashtags

{ "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