We had some problems with a image uploading to Heroku so during evaluation of a project it is hosted here.
- env variable
GOOGLE_APPLICATION_CREDENTIALS
needs to be set to the path where service account key is stored - it is sufficient to place
access.json
inside.secrets
folder
- Install virtualenv via
pip install virtualenv
(alternativelypip3 install virtualenv
). - Create new virtual environment
virtualenv venv
(alternativelyvirtualenv -p python3 venv
). - Activate virtual environment
source venv/bin/activate
(Windows:venv\Scripts\activate
). - Install all requirements via
pip install -r requirements.txt
- Leaving virtual environment:
deactivate
.
- Export PYTHONPATH to root dir
export PYTHONPATH=`pwd`
. - Download random images
python scripts/download_random_photos.py
. - Download Instagram profile
python scripts/download_ig_profile.py --profile jpancik
. - Annotate random images
python scripts/annotate_images.py --input resources/random-images/
. - Annotate IG profile images
python scripts/annotate_images.py --input profiles/jpancik/
. - Rank images
python scripts/rank_images.py --library profiles/jpancik/ --candidates random-images/
. - Open HTML with results in
resources/random-images/recommendations.html
. - $$$ Profit $$$.
- Perform all steps in Setup
- Run server:
- dev
python manage.py runserver
is listening on127.0.0.1:8000
- prod
gunicorn --timeout 300 frontend.wsgi
- dev
python scripts/export_label_count_from_profiles_to_csv.py --dbfile <PATH_TO_DB_FILE> --output <PATH_TO_EXPORT_CSV> --min_score <OPTIONAL_MIN_SCORE>
- Download model from
https://www.dropbox.com/s/buix0deqlks4312/lexvec.commoncrawl.ngramsubwords.300d.W.pos.bin.gz?dl=1
- Unzip it to
/lib/lexvec_model/lexvec_model.bin