Meena commited on
Commit
22b38b8
1 Parent(s): 85eb3dd

Update app/tapas.py

Browse files
Files changed (1) hide show
  1. app/tapas.py +10 -10
app/tapas.py CHANGED
@@ -65,16 +65,16 @@ def postprocess_predictions(predicted_aggregation_operators, predicted_table_cel
65
  # Process predicted table cell coordinates
66
  answers = []
67
  for agg, coordinates in zip(predicted_aggregation_operators, predicted_table_cell_coords):
68
- if len(coordinates) == 1:
69
- # 1 cell
70
- answers.append(table.iat[coordinates[0]])
71
- else:
72
- # > 1 cell
73
- cell_values = []
74
- for coordinate in coordinates:
75
- cell_values.append(table.iat[coordinate])
76
- answers.append(", ".join(cell_values))
77
-
78
  # Return values
79
  return aggregation_predictions_string, answers
80
 
 
65
  # Process predicted table cell coordinates
66
  answers = []
67
  for agg, coordinates in zip(predicted_aggregation_operators, predicted_table_cell_coords):
68
+ if len(coordinates) == 1:
69
+ # 1 cell
70
+ answers.append(table.iat[coordinates[0]])
71
+ else:
72
+ # > 1 cell
73
+ cell_values = []
74
+ for coordinate in coordinates:
75
+ cell_values.append(table.iat[coordinate])
76
+ answers.append(", ".join(cell_values))
77
+
78
  # Return values
79
  return aggregation_predictions_string, answers
80