Spaces:
Build error
Build error
Update app/tapas.py
Browse files- app/tapas.py +1 -2
app/tapas.py
CHANGED
@@ -93,9 +93,8 @@ def execute_query(query, table):
|
|
93 |
"""
|
94 |
Invoke the TAPAS model.
|
95 |
"""
|
96 |
-
|
97 |
queries = [query]
|
98 |
-
|
99 |
table, inputs = prepare_inputs(table, queries, tokenizer)
|
100 |
predicted_table_cell_coords, predicted_aggregation_operators = generate_predictions(inputs, model, tokenizer)
|
101 |
aggregation_predictions_string, answers = postprocess_predictions(predicted_aggregation_operators, predicted_table_cell_coords, table)
|
|
|
93 |
"""
|
94 |
Invoke the TAPAS model.
|
95 |
"""
|
|
|
96 |
queries = [query]
|
97 |
+
tokenizer, model = load_model_and_tokenizer()
|
98 |
table, inputs = prepare_inputs(table, queries, tokenizer)
|
99 |
predicted_table_cell_coords, predicted_aggregation_operators = generate_predictions(inputs, model, tokenizer)
|
100 |
aggregation_predictions_string, answers = postprocess_predictions(predicted_aggregation_operators, predicted_table_cell_coords, table)
|