Spaces:
Runtime error
Runtime error
shivambhosale
commited on
Commit
•
44c54df
1
Parent(s):
3904368
Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,8 @@ import torch
|
|
4 |
import gradio as gr
|
5 |
|
6 |
def getoutput(input_img):
|
7 |
-
unet = UNet().to(
|
8 |
-
unet = torch.load("unet_06_07_2022_17_13_42_256_256.pth", map_location=
|
9 |
output_img = make_predictions(unet, input_img, threshold=0.5)
|
10 |
return output_img
|
11 |
|
|
|
4 |
import gradio as gr
|
5 |
|
6 |
def getoutput(input_img):
|
7 |
+
unet = UNet().to('cpu')
|
8 |
+
unet = torch.load("unet_06_07_2022_17_13_42_256_256.pth", map_location='cpu').to('cpu')
|
9 |
output_img = make_predictions(unet, input_img, threshold=0.5)
|
10 |
return output_img
|
11 |
|