Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
media Initial commit Mar 5, 2019
.env.example Initial commit Mar 5, 2019 Initial commit Mar 5, 2019

Examples of using celebrity detection model

  1. Before running these examples you need to ensure that you downloaded the latest archive with Giphy pretrained models (resources). It can be done by this script:


    It will download the latest archive with all needed components and extract it into resources directory.

  2. Create .env file:

    cp .env.example .env

    and ensure that APP_DATA_DIR variable points to the resources directory.

  3. Create a virtual environment to localize dependencies (optional):

    pip install --upgrade virtualenv
    virtualenv -p python3 ../venv
    source ../venv/bin/activate
  4. Install model_train package by running the following command from the top-level directory:

    pip install -e .
  5. Install requirements from examples directory:

    pip install -r requirements.txt

Once you've completed the steps above, there are 2 ways to interact with our model: an inference script and flask application.

Script for model inference

With url or local path to jpg image:

python --image_path media/image.jpg

or with url or local path to gif (or mp4) video:

python --gif_path media/video.gif

Flask application

To start the app just run:


Open provided url in your browser and you should see a UI where you can paste links to images and gifs to test the model.

You can’t perform that action at this time.