Serkan Ozturk commited on
Commit
c07b674
·
1 Parent(s): b9a007e

fsjgkldjş

Browse files
Files changed (1) hide show
  1. handler.py +2 -0
handler.py CHANGED
@@ -42,6 +42,8 @@ class EndpointHandler():
42
  upscaled = self.model(img)
43
  upscaled = upscaled.squeeze(0).permute(1,2,0)
44
  upscaled = upscaled.numpy()
 
 
45
 
46
  pil = Image.fromarray(upscaled)
47
  # Save the image to a buffer
 
42
  upscaled = self.model(img)
43
  upscaled = upscaled.squeeze(0).permute(1,2,0)
44
  upscaled = upscaled.numpy()
45
+ upscaled = np.clip(upscaled * 255, 0, 255).astype(np.uint8)
46
+
47
 
48
  pil = Image.fromarray(upscaled)
49
  # Save the image to a buffer