renatotn7 commited on
Commit
37496b5
·
1 Parent(s): 21a2ce4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -90,12 +90,11 @@ for img_path in img_list:
90
 
91
 
92
  def inference(img):
93
- input_img = cv2.imread(img, cv2.IMREAD_COLOR)
94
- cropped_faces, restored_faces, restored_img = restorer.enhance(
95
- input_img, has_aligned=False, only_center_face=False, paste_back=True)
96
 
97
  #return Image.fromarray(restored_faces[0][:,:,::-1])
98
- return Image.fromarray(restored_img[:, :, ::-1])
99
 
100
  title = "Melhoria de imagens"
101
 
@@ -111,7 +110,7 @@ gr.Interface(
111
  title=title,
112
  description=description
113
  #,
114
- #examples=[
115
 
116
  #['edison.jpg'],
117
  #['pessoa3.jpg']
 
90
 
91
 
92
  def inference(img):
93
+ input_img = cv2.imread("./_output/restored_imgs/imagem-0001.png" , cv2.IMREAD_COLOR)
94
+
 
95
 
96
  #return Image.fromarray(restored_faces[0][:,:,::-1])
97
+ return input_img
98
 
99
  title = "Melhoria de imagens"
100
 
 
110
  title=title,
111
  description=description
112
  #,
113
+ #examples=[
114
 
115
  #['edison.jpg'],
116
  #['pessoa3.jpg']