mirror of
				https://github.com/deepset-ai/haystack.git
				synced 2025-11-04 03:39:31 +00:00 
			
		
		
		
	Fix error when model does not select any cells (#1703)
This commit is contained in:
		
							parent
							
								
									892ce4a760
								
							
						
					
					
						commit
						5654ad1243
					
				@ -195,6 +195,9 @@ class TableReader(BaseReader):
 | 
			
		||||
        # No aggregation needed as only one cell selected as answer_cells
 | 
			
		||||
        if len(answer_cells) == 1:
 | 
			
		||||
            return answer_cells[0]
 | 
			
		||||
        # Return empty string if model did not select any cell as answer
 | 
			
		||||
        if len(answer_cells) == 0:
 | 
			
		||||
            return ""
 | 
			
		||||
 | 
			
		||||
        # Parse answer cells in order to aggregate numerical values
 | 
			
		||||
        parsed_answer_cells = [parser.parse(cell) for cell in answer_cells]
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user