lucky0146 commited on
Commit
8eb8d49
·
verified ·
1 Parent(s): cc1070a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -16
app.py CHANGED
@@ -1,17 +1,4 @@
1
- import gradio as gr
2
- from gfpgan import GFPGANer
3
- import cv2
4
 
5
- restorer = GFPGANer(
6
- model_path='https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/GFPGANv1.3.pth',
7
- upscale=1,
8
- arch='clean',
9
- channel_multiplier=2,
10
- bg_upsampler=None
11
- )
12
-
13
- def restore_image(img):
14
- cropped_faces, restored_faces, restored_img = restorer.enhance(img, has_aligned=False, only_center_face=False)
15
- return restored_img
16
-
17
- gr.Interface(fn=restore_image, inputs=gr.Image(type='numpy'), outputs=gr.Image(type='numpy')).launch()
 
1
+ from gfpgan_cpu import create_gradio_app
 
 
2
 
3
+ app = create_gradio_app()
4
+ app.launch()