File size: 466 Bytes
42b38a5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import replicate


model = replicate.models.get("tencentarc/gfpgan")
version = model.versions.get("9283608cc6b7be6b65a8e44983db012355fde4132009bf99d976b2f0896856a3")


def gfpgan_predict(input_image : str):
    '''
    takes path to image as input and returns enhanced image

    Parameters
    ----------
    input_image : str
        path to the image file
    '''    
    output = version.predict(img=input_image, version='v1.4', scale=1.0)
    
    return output