juaben commited on
Commit
ad11ca2
·
verified ·
1 Parent(s): 900e971

Model changed and weights

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -1,10 +1,10 @@
1
  import gradio as gr
2
- from PIL import Image
3
  import torch
4
  import torchvision.transforms as transforms
5
  import numpy as np
6
 
7
- from archs.model import FourNet
 
8
 
9
 
10
  device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
@@ -13,11 +13,11 @@ pil_to_tensor = transforms.ToTensor()
13
 
14
  # define some parameters based on the run we want to make
15
 
16
- model = FourNet(nf = 16)
17
 
18
- checkpoints = torch.load('./models/NAFourNet16_LOLv2Real.pt', map_location=device)
19
 
20
- model.load_state_dict(checkpoints['model_state_dict'])
21
 
22
  model = model.to(device)
23
 
 
1
  import gradio as gr
 
2
  import torch
3
  import torchvision.transforms as transforms
4
  import numpy as np
5
 
6
+ from PIL import Image
7
+ from model.flol import create_model
8
 
9
 
10
  device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
 
13
 
14
  # define some parameters based on the run we want to make
15
 
16
+ model = create_model()
17
 
18
+ checkpoints = torch.load('./weights/flolv2_UHDLL.pt', map_location=device)
19
 
20
+ model.load_state_dict(checkpoints['params'])
21
 
22
  model = model.to(device)
23