Commit
·
6f2e604
1
Parent(s):
25b8dd6
Update app.py
Browse files
app.py
CHANGED
@@ -224,10 +224,10 @@ def colorize2(img: Image.Image, model_option: str):
|
|
224 |
|
225 |
with torch.inference_mode():
|
226 |
out2 = model_net(input)
|
227 |
-
|
228 |
-
|
229 |
|
230 |
-
return Image.fromarray(
|
231 |
|
232 |
|
233 |
with gr.Blocks() as demo:
|
|
|
224 |
|
225 |
with torch.inference_mode():
|
226 |
out2 = model_net(input)
|
227 |
+
out2 = sample[0].cpu().numpy().transpose([1,2,0])
|
228 |
+
out2 = np.uint8(((out + 1) / 2 * 255).clip(0,255))
|
229 |
|
230 |
+
return Image.fromarray(out2).convert('RGB')
|
231 |
|
232 |
|
233 |
with gr.Blocks() as demo:
|