kh-CHEUNG commited on
Commit
b175693
·
verified ·
1 Parent(s): ae12c74

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -92,7 +92,7 @@ with col2:
92
 
93
  mean = processor.image_processor.image_mean
94
  std = processor.image_processor.image_std
95
- unnormalized_image = (encoding.pixel_values.squeeze().numpy() * np.array(std)[:, None, None]) + np.array(mean)[:, None, None]
96
  unnormalized_image = (unnormalized_image * 255).astype(np.uint8)
97
  unnormalized_image = np.moveaxis(unnormalized_image, 0, -1)
98
  unnormalized_image = Image.fromarray(unnormalized_image)
 
92
 
93
  mean = processor.image_processor.image_mean
94
  std = processor.image_processor.image_std
95
+ unnormalized_image = (model_encoding.pixel_values.squeeze().numpy() * np.array(std)[:, None, None]) + np.array(mean)[:, None, None]
96
  unnormalized_image = (unnormalized_image * 255).astype(np.uint8)
97
  unnormalized_image = np.moveaxis(unnormalized_image, 0, -1)
98
  unnormalized_image = Image.fromarray(unnormalized_image)