Meloo commited on
Commit
f1868ba
1 Parent(s): 28bb975

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -1,5 +1,3 @@
1
- import sys
2
- sys.path.append('SAFMN')
3
 
4
  import os
5
  import cv2
@@ -11,6 +9,7 @@ import torch
11
  import torch.nn.functional as F
12
  import gradio as gr
13
 
 
14
  from utils.download_url import load_file_from_url
15
  from utils.color_fix import wavelet_reconstruction
16
  from models.safmn_arch import SAFMN
@@ -124,7 +123,7 @@ def inference(image, upscale, large_input_flag, color_fix):
124
  upscale = 2
125
 
126
  model = set_safmn(upscale)
127
-
128
  img = np.array(image)
129
  img = img / 255.
130
  img = img.astype(np.float32)
 
 
 
1
 
2
  import os
3
  import cv2
 
9
  import torch.nn.functional as F
10
  import gradio as gr
11
 
12
+ from PIL import Image
13
  from utils.download_url import load_file_from_url
14
  from utils.color_fix import wavelet_reconstruction
15
  from models.safmn_arch import SAFMN
 
123
  upscale = 2
124
 
125
  model = set_safmn(upscale)
126
+
127
  img = np.array(image)
128
  img = img / 255.
129
  img = img.astype(np.float32)