Added checking of target class name is valid
	
		
			
	
		
	
	
		
	
		
			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:
		@@ -61,9 +61,12 @@ class SVMView(FlaskView):
 | 
			
		||||
 | 
			
		||||
        try:
 | 
			
		||||
 | 
			
		||||
            _, _, _, _, mid_window, mid_step, short_window, short_step, compute_beat \
 | 
			
		||||
            _, _, _, classes, mid_window, mid_step, short_window, short_step, compute_beat \
 | 
			
		||||
                = load_model(temp_model_filename)
 | 
			
		||||
 | 
			
		||||
            if info['target_class_name'] not in classes:
 | 
			
		||||
                abort(400, f"This model does not have a class named {info['target_class_name']}")
 | 
			
		||||
 | 
			
		||||
            # Because of pyAudiomeme the files already saved, so we just use the file uploader functions
 | 
			
		||||
            storage.connection.fput_object(
 | 
			
		||||
                current_app.config['MINIO_SVM_BUCKET_NAME'],
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user