Spaces:
				
			
			
	
			
			
					
		Running
		
	
	
	
			
			
	
	
	
	
		
		
					
		Running
		
	ZeroGPU tag
Browse files- app/sample_caching.py +8 -0
 
    	
        app/sample_caching.py
    CHANGED
    
    | 
         @@ -18,6 +18,14 @@ class Sample: 
     | 
|
| 18 | 
         | 
| 19 | 
         
             
            # cache audio samples for quick voting
         
     | 
| 20 | 
         
             
            cached_samples: List[Sample] = []
         
     | 
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 
         | 
|
| 21 | 
         
             
            voting_users = {
         
     | 
| 22 | 
         
             
                # userid as the key and USER() as the value
         
     | 
| 23 | 
         
             
            }
         
     | 
| 
         | 
|
| 18 | 
         | 
| 19 | 
         
             
            # cache audio samples for quick voting
         
     | 
| 20 | 
         
             
            cached_samples: List[Sample] = []
         
     | 
| 21 | 
         
            +
             
     | 
| 22 | 
         
            +
            @spaces.GPU(duration=10)
         
     | 
| 23 | 
         
            +
            def asr_cached_for_dataset():
         
     | 
| 24 | 
         
            +
             
     | 
| 25 | 
         
            +
                for caudio in cached_samples:
         
     | 
| 26 | 
         
            +
                    pass
         
     | 
| 27 | 
         
            +
                return True
         
     | 
| 28 | 
         
            +
             
     | 
| 29 | 
         
             
            voting_users = {
         
     | 
| 30 | 
         
             
                # userid as the key and USER() as the value
         
     | 
| 31 | 
         
             
            }
         
     |