-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlambda_function.py
More file actions
34 lines (26 loc) · 825 Bytes
/
lambda_function.py
File metadata and controls
34 lines (26 loc) · 825 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import numpy as np
import tensorflow as tf
import PIL
import matplotlib
from distutils.version import StrictVersion
from PIL import Image
from utils import ops as utils_ops
from matplotlib import pyplot as plt
# Object detection imports
from utils import label_map_util
from utils import visualization_utils as vis_util
import json
def lambda_handler(event, context):
tf_version = tf.__version__
pil_version = PIL.__version__
np_version = np.version.version
matplotlib_version = matplotlib.__version__
v_dict={} #initialize dicitionary
v_dict.update(tensorflow=tf_version)
v_dict.update(pil=pil_version)
v_dict.update(numpy=np_version)
v_dict.update(matplotlib=matplotlib_version)
return {
'statusCode': 200,
'Payload': json.dumps(v_dict)
}