Commit 
							
							·
						
						1ae4124
	
1
								Parent(s):
							
							cb58a19
								
mask type manual
Browse files
    	
        app.py
    CHANGED
    
    | 
         @@ -36,7 +36,6 @@ def eraser_api_call(image_base64_file, mask_base64_file, seed, mask_type, origin 
     | 
|
| 36 | 
         
             
                }
         
     | 
| 37 | 
         
             
                response = requests.post(url, json=payload, headers=auth_headers)
         
     | 
| 38 | 
         
             
                response = response.json()
         
     | 
| 39 | 
         
            -
                print("response: ", response) # TODO: delete
         
     | 
| 40 | 
         
             
                res_image = download_image(response["result_url"])
         
     | 
| 41 | 
         | 
| 42 | 
         
             
                return res_image
         
     | 
| 
         @@ -106,7 +105,7 @@ def predict(dict, guidance_scale=1.2, seed=123456): 
     | 
|
| 106 | 
         
             
                image_base64_file = convert_mask_image_to_base64_string(init_image)
         
     | 
| 107 | 
         
             
                mask_base64_file = convert_mask_image_to_base64_string(mask)
         
     | 
| 108 | 
         | 
| 109 | 
         
            -
                mask_type = " 
     | 
| 110 | 
         
             
                original_quality = True
         
     | 
| 111 | 
         
             
                gen_img = eraser_api_call(image_base64_file, mask_base64_file, seed, mask_type, original_quality, guidance_scale)
         
     | 
| 112 | 
         | 
| 
         | 
|
| 36 | 
         
             
                }
         
     | 
| 37 | 
         
             
                response = requests.post(url, json=payload, headers=auth_headers)
         
     | 
| 38 | 
         
             
                response = response.json()
         
     | 
| 
         | 
|
| 39 | 
         
             
                res_image = download_image(response["result_url"])
         
     | 
| 40 | 
         | 
| 41 | 
         
             
                return res_image
         
     | 
| 
         | 
|
| 105 | 
         
             
                image_base64_file = convert_mask_image_to_base64_string(init_image)
         
     | 
| 106 | 
         
             
                mask_base64_file = convert_mask_image_to_base64_string(mask)
         
     | 
| 107 | 
         | 
| 108 | 
         
            +
                mask_type = "manual"
         
     | 
| 109 | 
         
             
                original_quality = True
         
     | 
| 110 | 
         
             
                gen_img = eraser_api_call(image_base64_file, mask_base64_file, seed, mask_type, original_quality, guidance_scale)
         
     | 
| 111 | 
         |