Spaces:
				
			
			
	
			
			
		Configuration error
		
	
	
	
			
			
	
	
	
	
		
		
		Configuration error
		
	Commit 
							
							·
						
						6bdd2f6
	
1
								Parent(s):
							
							ebfc4f8
								
add_durations
Browse files- minigpt4_video_demo.py +2 -2
    	
        minigpt4_video_demo.py
    CHANGED
    
    | @@ -245,12 +245,12 @@ existed_subtitles={} | |
| 245 | 
             
            for sub in os.listdir(inference_subtitles_folder):
         | 
| 246 | 
             
                existed_subtitles[sub.split('.')[0]]=True
         | 
| 247 |  | 
| 248 | 
            -
            @spaces.GPU()
         | 
| 249 | 
             
            def gradio_demo_local(video_path,has_sub,instruction):
         | 
| 250 | 
             
                pred=run(video_path,instruction,model,vis_processor,gen_subtitles=has_sub)
         | 
| 251 | 
             
                return pred
         | 
| 252 |  | 
| 253 | 
            -
            @spaces.GPU()
         | 
| 254 | 
             
            def gradio_demo_youtube(youtube_url,has_sub,instruction):
         | 
| 255 | 
             
                video_path=get_video_url(youtube_url,has_sub)
         | 
| 256 | 
             
                pred=run(video_path,instruction,model,vis_processor,gen_subtitles=has_sub)
         | 
|  | |
| 245 | 
             
            for sub in os.listdir(inference_subtitles_folder):
         | 
| 246 | 
             
                existed_subtitles[sub.split('.')[0]]=True
         | 
| 247 |  | 
| 248 | 
            +
            @spaces.GPU(duration=180)
         | 
| 249 | 
             
            def gradio_demo_local(video_path,has_sub,instruction):
         | 
| 250 | 
             
                pred=run(video_path,instruction,model,vis_processor,gen_subtitles=has_sub)
         | 
| 251 | 
             
                return pred
         | 
| 252 |  | 
| 253 | 
            +
            @spaces.GPU(duration=180)
         | 
| 254 | 
             
            def gradio_demo_youtube(youtube_url,has_sub,instruction):
         | 
| 255 | 
             
                video_path=get_video_url(youtube_url,has_sub)
         | 
| 256 | 
             
                pred=run(video_path,instruction,model,vis_processor,gen_subtitles=has_sub)
         | 
