patrawtf commited on
Commit
efb54e6
1 Parent(s): ef21cbc

Update app/tapex.py

Browse files
Files changed (1) hide show
  1. app/tapex.py +1 -2
app/tapex.py CHANGED
@@ -8,7 +8,6 @@ def execute_query(query, csv_file):
8
  a = datetime.datetime.now()
9
 
10
  table = pd.read_csv(csv_file.name, delimiter=",")
11
- table.fillna(0, inplace=True)
12
  table = table.astype(str)
13
 
14
  model_name = "microsoft/tapex-large-finetuned-wtq"
@@ -17,7 +16,7 @@ def execute_query(query, csv_file):
17
 
18
  queries = [query]
19
 
20
- encoding = tokenizer(table=table, queries=queries, padding=True, return_tensors="pt",truncation=True)
21
  outputs = model.generate(**encoding)
22
  ans = tokenizer.batch_decode(outputs, skip_special_tokens=True)
23
 
 
8
  a = datetime.datetime.now()
9
 
10
  table = pd.read_csv(csv_file.name, delimiter=",")
 
11
  table = table.astype(str)
12
 
13
  model_name = "microsoft/tapex-large-finetuned-wtq"
 
16
 
17
  queries = [query]
18
 
19
+ encoding = tokenizer(table=table, query=queries, padding=True, return_tensors="pt",truncation=True)
20
  outputs = model.generate(**encoding)
21
  ans = tokenizer.batch_decode(outputs, skip_special_tokens=True)
22