Update
Browse files
    	
        app.py
    CHANGED
    
    | 
         @@ -108,7 +108,7 @@ def run( 
     | 
|
| 108 | 
         
             
                cond_tau: float = 0.8,
         
     | 
| 109 | 
         
             
                seed: int = 0,
         
     | 
| 110 | 
         
             
            ) -> PIL.Image.Image:
         
     | 
| 111 | 
         
            -
                image = image.convert("RGB") 
     | 
| 112 | 
         
             
                image = TF.to_tensor(image) > 0.5
         
     | 
| 113 | 
         
             
                image = TF.to_pil_image(image.to(torch.float32))
         
     | 
| 114 | 
         | 
| 
         @@ -143,7 +143,7 @@ with gr.Blocks(css="style.css") as demo: 
     | 
|
| 143 | 
         
             
                                source="canvas",
         
     | 
| 144 | 
         
             
                                tool="sketch",
         
     | 
| 145 | 
         
             
                                type="pil",
         
     | 
| 146 | 
         
            -
                                image_mode=" 
     | 
| 147 | 
         
             
                                invert_colors=True,
         
     | 
| 148 | 
         
             
                                shape=(1024, 1024),
         
     | 
| 149 | 
         
             
                                brush_radius=4,
         
     | 
| 
         | 
|
| 108 | 
         
             
                cond_tau: float = 0.8,
         
     | 
| 109 | 
         
             
                seed: int = 0,
         
     | 
| 110 | 
         
             
            ) -> PIL.Image.Image:
         
     | 
| 111 | 
         
            +
                image = image.convert("RGB")
         
     | 
| 112 | 
         
             
                image = TF.to_tensor(image) > 0.5
         
     | 
| 113 | 
         
             
                image = TF.to_pil_image(image.to(torch.float32))
         
     | 
| 114 | 
         | 
| 
         | 
|
| 143 | 
         
             
                                source="canvas",
         
     | 
| 144 | 
         
             
                                tool="sketch",
         
     | 
| 145 | 
         
             
                                type="pil",
         
     | 
| 146 | 
         
            +
                                image_mode="L",
         
     | 
| 147 | 
         
             
                                invert_colors=True,
         
     | 
| 148 | 
         
             
                                shape=(1024, 1024),
         
     | 
| 149 | 
         
             
                                brush_radius=4,
         
     |