fix remobe bgr
Browse files
app.py
CHANGED
@@ -7,10 +7,10 @@ from huggingface_hub import hf_hub_download
|
|
7 |
|
8 |
clientGFPGAN = Client("leonelhs/GFPGAN")
|
9 |
clientSuperface = Client("leonelhs/superface")
|
10 |
-
clientZeroScratches = Client("leonelhs/
|
11 |
clientDeoldify = Client("leonelhs/deoldify")
|
12 |
clientEnhanceLight = Client("leonelhs/Zero-DCE")
|
13 |
-
clientZeroBackground = Client("leonelhs/
|
14 |
clientFaceParser = Client("leonelhs/faceparser")
|
15 |
|
16 |
REPO_ID = "leonelhs/faceshine"
|
@@ -32,7 +32,7 @@ def enhance_face(image, upsampler, face_enhancer, scale):
|
|
32 |
|
33 |
|
34 |
def zero_scratches(image):
|
35 |
-
return clientZeroScratches.predict(image, api_name="/predict")
|
36 |
|
37 |
|
38 |
def colorize_photo(image):
|
@@ -44,7 +44,7 @@ def enhance_light(image):
|
|
44 |
|
45 |
|
46 |
def zero_background(image, new_bgr=None):
|
47 |
-
return clientZeroBackground.predict(image, new_bgr, api_name="/predict")
|
48 |
|
49 |
|
50 |
def parse_face(image):
|
|
|
7 |
|
8 |
clientGFPGAN = Client("leonelhs/GFPGAN")
|
9 |
clientSuperface = Client("leonelhs/superface")
|
10 |
+
clientZeroScratches = Client("leonelhs/ZeroScratches")
|
11 |
clientDeoldify = Client("leonelhs/deoldify")
|
12 |
clientEnhanceLight = Client("leonelhs/Zero-DCE")
|
13 |
+
clientZeroBackground = Client("leonelhs/remove-background")
|
14 |
clientFaceParser = Client("leonelhs/faceparser")
|
15 |
|
16 |
REPO_ID = "leonelhs/faceshine"
|
|
|
32 |
|
33 |
|
34 |
def zero_scratches(image):
|
35 |
+
return clientZeroScratches.predict(image, api_name="/predict")
|
36 |
|
37 |
|
38 |
def colorize_photo(image):
|
|
|
44 |
|
45 |
|
46 |
def zero_background(image, new_bgr=None):
|
47 |
+
return clientZeroBackground.predict(image, new_bgr, api_name="/predict")[0]
|
48 |
|
49 |
|
50 |
def parse_face(image):
|