kfahn commited on
Commit
f62321a
·
1 Parent(s): cfc764d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -87,9 +87,9 @@ model1 = Generator(3, 1, 3)
87
  model1.load_state_dict(torch.load('model.pth', map_location=torch.device('cpu')))
88
  model1.eval()
89
 
90
- model3 = Generator(3, 1, 3)
91
- model3.load_state_dict(torch.load('model.pth', map_location=torch.device('cpu')))
92
- model3.eval()
93
 
94
  # model2 = Generator(3, 1, 3)
95
  # model2.load_state_dict(torch.load('model2.pth', map_location=torch.device('cpu')))
@@ -103,7 +103,7 @@ def predict(input_img):
103
 
104
  drawing = 0
105
  with torch.no_grad():
106
- drawing = model3(input_img)[0].detach()
107
 
108
  drawing = transforms.ToPILImage()(drawing)
109
  return drawing
 
87
  model1.load_state_dict(torch.load('model.pth', map_location=torch.device('cpu')))
88
  model1.eval()
89
 
90
+ # model3 = Generator(3, 1, 3)
91
+ # model3.load_state_dict(torch.load('model.pth', map_location=torch.device('cpu')))
92
+ # model3.eval()
93
 
94
  # model2 = Generator(3, 1, 3)
95
  # model2.load_state_dict(torch.load('model2.pth', map_location=torch.device('cpu')))
 
103
 
104
  drawing = 0
105
  with torch.no_grad():
106
+ drawing = model1(input_img)[0].detach()
107
 
108
  drawing = transforms.ToPILImage()(drawing)
109
  return drawing