Spaces:
Sleeping
Sleeping
app.py文件归一化操作重复进行
Browse files
app.py
CHANGED
@@ -104,9 +104,9 @@ class Application:
|
|
104 |
return Image.fromarray(np.uint8(np.random.random((32, 32, 3)) * 255)), "请选择模型名称"
|
105 |
image = np.array(image_pil)
|
106 |
raw_height, raw_width = image.shape[0], image.shape[1]
|
|
|
107 |
transform = self.transform(image=image)
|
108 |
image = transform["image"]
|
109 |
-
image = image / 255.0
|
110 |
fake_image = self.inference(image, model_name)
|
111 |
fake_image = self.to_pil(fake_image, raw_width, raw_height)
|
112 |
return fake_image, "success"
|
|
|
104 |
return Image.fromarray(np.uint8(np.random.random((32, 32, 3)) * 255)), "请选择模型名称"
|
105 |
image = np.array(image_pil)
|
106 |
raw_height, raw_width = image.shape[0], image.shape[1]
|
107 |
+
print("image type:",image.dtype)
|
108 |
transform = self.transform(image=image)
|
109 |
image = transform["image"]
|
|
|
110 |
fake_image = self.inference(image, model_name)
|
111 |
fake_image = self.to_pil(fake_image, raw_width, raw_height)
|
112 |
return fake_image, "success"
|