shivambhosale commited on
Commit
44c54df
1 Parent(s): 3904368

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,8 +4,8 @@ import torch
4
  import gradio as gr
5
 
6
  def getoutput(input_img):
7
- unet = UNet().to(device)
8
- unet = torch.load("unet_06_07_2022_17_13_42_256_256.pth", map_location=device).to(device)
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