Fixed model not downloading
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		@@ -36,7 +36,7 @@ def json_datetime_dumper(o):
 | 
			
		||||
class ModelMemer:
 | 
			
		||||
 | 
			
		||||
    def __init__(self):
 | 
			
		||||
        self._loaded_model = None
 | 
			
		||||
        self._loaded_model = False
 | 
			
		||||
 | 
			
		||||
    def download_model_if_needed(self):
 | 
			
		||||
        models_dir = "/tmp/svm_model"
 | 
			
		||||
@@ -79,6 +79,8 @@ class ModelMemer:
 | 
			
		||||
        target_class_name = self.model_details['target_class_name']
 | 
			
		||||
        self.target_id = self.classes.index(target_class_name)
 | 
			
		||||
 | 
			
		||||
        self._loaded_model = True
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def run_classification(audio_file_path: str, memer: ModelMemer):
 | 
			
		||||
    memer.download_model_if_needed()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user