Spaces:
Build error
Build error
Update app/tapas.py
Browse files- app/tapas.py +1 -3
app/tapas.py
CHANGED
@@ -4,8 +4,6 @@ import re
|
|
4 |
|
5 |
p = re.compile('\d+(\.\d+)?')
|
6 |
|
7 |
-
queries = ["Rating Of Breaking Bad?","Rating Of The God Father?"]
|
8 |
-
|
9 |
def load_model_and_tokenizer():
|
10 |
"""
|
11 |
Load
|
@@ -96,7 +94,7 @@ def execute_query(query, table):
|
|
96 |
"""
|
97 |
Invoke the TAPAS model.
|
98 |
"""
|
99 |
-
|
100 |
tokenizer, model = load_model_and_tokenizer()
|
101 |
table, inputs = prepare_inputs(table, queries, tokenizer)
|
102 |
predicted_table_cell_coords, predicted_aggregation_operators = generate_predictions(inputs, model, tokenizer)
|
|
|
4 |
|
5 |
p = re.compile('\d+(\.\d+)?')
|
6 |
|
|
|
|
|
7 |
def load_model_and_tokenizer():
|
8 |
"""
|
9 |
Load
|
|
|
94 |
"""
|
95 |
Invoke the TAPAS model.
|
96 |
"""
|
97 |
+
queries = [query]
|
98 |
tokenizer, model = load_model_and_tokenizer()
|
99 |
table, inputs = prepare_inputs(table, queries, tokenizer)
|
100 |
predicted_table_cell_coords, predicted_aggregation_operators = generate_predictions(inputs, model, tokenizer)
|