Spaces:
				
			
			
	
			
			
		Paused
		
	
	
	
			
			
	
	
	
	
		
		
		Paused
		
	Update app.py
Browse files
    	
        app.py
    CHANGED
    
    | @@ -4,6 +4,7 @@ from huggingface_hub import hf_hub_download | |
| 4 |  | 
| 5 | 
             
            from gradio_tabs.animation import animation
         | 
| 6 | 
             
            from gradio_tabs.vid_edit import vid_edit
         | 
|  | |
| 7 | 
             
            from networks.generator import Generator
         | 
| 8 |  | 
| 9 | 
             
            device = torch.device("cuda")
         | 
| @@ -12,7 +13,7 @@ ckpt_path = hf_hub_download(repo_id="YaohuiW/LIA-X", filename="lia-x.pt") | |
| 12 | 
             
            gen.load_state_dict(torch.load(ckpt_path, weights_only=True))
         | 
| 13 | 
             
            gen.eval()
         | 
| 14 |  | 
| 15 | 
            -
            chunk_size= | 
| 16 |  | 
| 17 | 
             
            def load_file(path):
         | 
| 18 |  | 
| @@ -41,6 +42,7 @@ with gr.Blocks(css=custom_css, theme=gr.themes.Soft()) as demo: | |
| 41 | 
             
            	with gr.Row():
         | 
| 42 | 
             
            		with gr.Tabs():
         | 
| 43 | 
             
            			animation(gen, chunk_size, device)
         | 
|  | |
| 44 | 
             
            			vid_edit(gen, chunk_size, device)
         | 
| 45 |  | 
| 46 | 
             
            demo.launch(allowed_paths=["./data/source","./data/driving"])
         | 
|  | |
| 4 |  | 
| 5 | 
             
            from gradio_tabs.animation import animation
         | 
| 6 | 
             
            from gradio_tabs.vid_edit import vid_edit
         | 
| 7 | 
            +
            from gradio_tabs.img_edit import img_edit
         | 
| 8 | 
             
            from networks.generator import Generator
         | 
| 9 |  | 
| 10 | 
             
            device = torch.device("cuda")
         | 
|  | |
| 13 | 
             
            gen.load_state_dict(torch.load(ckpt_path, weights_only=True))
         | 
| 14 | 
             
            gen.eval()
         | 
| 15 |  | 
| 16 | 
            +
            chunk_size=32
         | 
| 17 |  | 
| 18 | 
             
            def load_file(path):
         | 
| 19 |  | 
|  | |
| 42 | 
             
            	with gr.Row():
         | 
| 43 | 
             
            		with gr.Tabs():
         | 
| 44 | 
             
            			animation(gen, chunk_size, device)
         | 
| 45 | 
            +
            			img_edit(gen, device)
         | 
| 46 | 
             
            			vid_edit(gen, chunk_size, device)
         | 
| 47 |  | 
| 48 | 
             
            demo.launch(allowed_paths=["./data/source","./data/driving"])
         | 
