chansung commited on
Commit
28a20cc
·
1 Parent(s): 81ec701

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -6
handler.py CHANGED
@@ -8,11 +8,7 @@ from tensorflow import keras
8
  from keras_cv.models.generative.stable_diffusion.decoder import Decoder
9
 
10
  class EndpointHandler():
11
- def __init__(self, path=""):
12
- gpus = tf.config.list_physical_devices(device_type = 'GPU')
13
- for gpu in gpus:
14
- tf.config.experimental.set_memory_growth(gpu, True)
15
-
16
  img_height = 512
17
  img_width = 512
18
  img_height = round(img_height / 128) * 128
@@ -27,7 +23,7 @@ class EndpointHandler():
27
 
28
  def __call__(self, data: Dict[str, Any]) -> str:
29
  # get inputs
30
- logging.info(data)
31
  latent = data.pop("inputs", data)
32
  batch_size = data.pop("batch_size", 1)
33
 
 
8
  from keras_cv.models.generative.stable_diffusion.decoder import Decoder
9
 
10
  class EndpointHandler():
11
+ def __init__(self, path=""):
 
 
 
 
12
  img_height = 512
13
  img_width = 512
14
  img_height = round(img_height / 128) * 128
 
23
 
24
  def __call__(self, data: Dict[str, Any]) -> str:
25
  # get inputs
26
+ logging.warning(data)
27
  latent = data.pop("inputs", data)
28
  batch_size = data.pop("batch_size", 1)
29