cantremember commited on
Commit
7a6a83f
·
1 Parent(s): b8b80ac

more logging

Browse files
Files changed (2) hide show
  1. assets/main.py +3 -0
  2. assets/script/entrypoint.sh +3 -0
assets/main.py CHANGED
@@ -14,11 +14,14 @@ import torch
14
 
15
  # multi-modal Model
16
  # accepts both text and image content (or audio, etc.)
 
17
  model = BlipForImageTextRetrieval.from_pretrained("Salesforce/blip-itm-base-coco")
18
  processor = AutoProcessor.from_pretrained("Salesforce/blip-itm-base-coco")
19
 
 
20
  raw_image = Image.open('./assets/pot-o-gold-my-little-pony-Derpy.jpeg').convert('RGB')
21
 
 
22
  statements = [
23
  "an image of a horse",
24
  "a horse and a rainbow",
 
14
 
15
  # multi-modal Model
16
  # accepts both text and image content (or audio, etc.)
17
+ print "loading model ..."
18
  model = BlipForImageTextRetrieval.from_pretrained("Salesforce/blip-itm-base-coco")
19
  processor = AutoProcessor.from_pretrained("Salesforce/blip-itm-base-coco")
20
 
21
+ print "loading image ..."
22
  raw_image = Image.open('./assets/pot-o-gold-my-little-pony-Derpy.jpeg').convert('RGB')
23
 
24
+ print "processing ..."
25
  statements = [
26
  "an image of a horse",
27
  "a horse and a rainbow",
assets/script/entrypoint.sh CHANGED
@@ -3,9 +3,12 @@ ROOT=$(cd `dirname $0` && pwd)
3
 
4
  set -e
5
 
 
 
6
  eval "$(conda shell.bash hook)"
7
  conda init
8
  conda activate my-first-docker
9
 
10
 
 
11
  python $ROOT/../main.py
 
3
 
4
  set -e
5
 
6
+
7
+ echo "initializing anaconda environment ..."
8
  eval "$(conda shell.bash hook)"
9
  conda init
10
  conda activate my-first-docker
11
 
12
 
13
+ echo "executing main.py ..."
14
  python $ROOT/../main.py