Spaces:
				
			
			
	
			
			
		Runtime error
		
	
	
	
			
			
	
	
	
	
		
		
		Runtime error
		
	chore: remove gr.Info
Browse files- app.py +1 -2
- src/gradio_pipeline.py +3 -3
    	
        app.py
    CHANGED
    
    | @@ -12,10 +12,9 @@ from src.gradio_pipeline import GradioPipeline | |
| 12 | 
             
            from src.config.crop_config import CropConfig
         | 
| 13 | 
             
            from src.config.argument_config import ArgumentConfig
         | 
| 14 | 
             
            from src.config.inference_config import InferenceConfig
         | 
| 15 | 
            -
            import gdown
         | 
| 16 | 
            -
            import os
         | 
| 17 | 
             
            import spaces
         | 
| 18 |  | 
|  | |
| 19 | 
             
            # folder_url = f"https://drive.google.com/drive/folders/1UtKgzKjFAOmZkhNK-OYT0caJ_w2XAnib"
         | 
| 20 | 
             
            # gdown.download_folder(url=folder_url, output="pretrained_weights", quiet=False)
         | 
| 21 |  | 
|  | |
| 12 | 
             
            from src.config.crop_config import CropConfig
         | 
| 13 | 
             
            from src.config.argument_config import ArgumentConfig
         | 
| 14 | 
             
            from src.config.inference_config import InferenceConfig
         | 
|  | |
|  | |
| 15 | 
             
            import spaces
         | 
| 16 |  | 
| 17 | 
            +
            # import gdown
         | 
| 18 | 
             
            # folder_url = f"https://drive.google.com/drive/folders/1UtKgzKjFAOmZkhNK-OYT0caJ_w2XAnib"
         | 
| 19 | 
             
            # gdown.download_folder(url=folder_url, output="pretrained_weights", quiet=False)
         | 
| 20 |  | 
    	
        src/gradio_pipeline.py
    CHANGED
    
    | @@ -61,7 +61,7 @@ class GradioPipeline(LivePortraitPipeline): | |
| 61 | 
             
                        self.cropper.update_config(self.args.__dict__)
         | 
| 62 | 
             
                        # video driven animation
         | 
| 63 | 
             
                        video_path, video_path_concat = self.execute(self.args)
         | 
| 64 | 
            -
                        gr.Info("Run successfully!", duration=2)
         | 
| 65 | 
             
                        return video_path, video_path_concat,
         | 
| 66 | 
             
                    else:
         | 
| 67 | 
             
                        raise gr.Error("The input source portrait or driving video hasn't been prepared yet 💥!", duration=5)
         | 
| @@ -96,7 +96,7 @@ class GradioPipeline(LivePortraitPipeline): | |
| 96 | 
             
                        out = self.live_portrait_wrapper.warp_decode(self.f_s_user, self.x_s_user, x_d_new)
         | 
| 97 | 
             
                        out = self.live_portrait_wrapper.parse_output(out['out'])[0]
         | 
| 98 | 
             
                        out_to_ori_blend = paste_back(out, self.crop_M_c2o, self.img_rgb, self.mask_ori)
         | 
| 99 | 
            -
                        gr.Info("Run successfully!", duration=2)
         | 
| 100 | 
             
                        return out, out_to_ori_blend
         | 
| 101 |  | 
| 102 |  | 
| @@ -104,7 +104,7 @@ class GradioPipeline(LivePortraitPipeline): | |
| 104 | 
             
                    """ for single image retargeting
         | 
| 105 | 
             
                    """
         | 
| 106 | 
             
                    if input_image_path is not None:
         | 
| 107 | 
            -
                        gr.Info("Upload successfully!", duration=2)
         | 
| 108 | 
             
                        self.start_prepare = True
         | 
| 109 | 
             
                        inference_cfg = self.live_portrait_wrapper.cfg
         | 
| 110 | 
             
                        ######## process source portrait ########
         | 
|  | |
| 61 | 
             
                        self.cropper.update_config(self.args.__dict__)
         | 
| 62 | 
             
                        # video driven animation
         | 
| 63 | 
             
                        video_path, video_path_concat = self.execute(self.args)
         | 
| 64 | 
            +
                        # gr.Info("Run successfully!", duration=2)
         | 
| 65 | 
             
                        return video_path, video_path_concat,
         | 
| 66 | 
             
                    else:
         | 
| 67 | 
             
                        raise gr.Error("The input source portrait or driving video hasn't been prepared yet 💥!", duration=5)
         | 
|  | |
| 96 | 
             
                        out = self.live_portrait_wrapper.warp_decode(self.f_s_user, self.x_s_user, x_d_new)
         | 
| 97 | 
             
                        out = self.live_portrait_wrapper.parse_output(out['out'])[0]
         | 
| 98 | 
             
                        out_to_ori_blend = paste_back(out, self.crop_M_c2o, self.img_rgb, self.mask_ori)
         | 
| 99 | 
            +
                        # gr.Info("Run successfully!", duration=2)
         | 
| 100 | 
             
                        return out, out_to_ori_blend
         | 
| 101 |  | 
| 102 |  | 
|  | |
| 104 | 
             
                    """ for single image retargeting
         | 
| 105 | 
             
                    """
         | 
| 106 | 
             
                    if input_image_path is not None:
         | 
| 107 | 
            +
                        # gr.Info("Upload successfully!", duration=2)
         | 
| 108 | 
             
                        self.start_prepare = True
         | 
| 109 | 
             
                        inference_cfg = self.live_portrait_wrapper.cfg
         | 
| 110 | 
             
                        ######## process source portrait ########
         | 
 
			
