merve HF staff commited on
Commit
3aa2f21
1 Parent(s): b4f9709

Update pipeline.py

Browse files
Files changed (1) hide show
  1. pipeline.py +2 -2
pipeline.py CHANGED
@@ -19,8 +19,8 @@ class PreTrainedPipeline():
19
  def __call__(self, inputs: "Image.Image")-> List[Dict[str, Any]]:
20
 
21
  # convert img to numpy array, resize and normalize to make the prediction
22
- with Image.open(inputs) as img:
23
- img = np.array(img)
24
 
25
  im = tf.image.resize(img, (128, 128))
26
  im = tf.cast(im, tf.float32) / 255.0
 
19
  def __call__(self, inputs: "Image.Image")-> List[Dict[str, Any]]:
20
 
21
  # convert img to numpy array, resize and normalize to make the prediction
22
+ #with Image.open(inputs) as img:
23
+ img = np.array(inputs)
24
 
25
  im = tf.image.resize(img, (128, 128))
26
  im = tf.cast(im, tf.float32) / 255.0