fschwartzer commited on
Commit
048e2e2
1 Parent(s): c00ab2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,11 +9,11 @@ df = pd.read_excel('discrepantes.xlsx')
9
  df.fillna(0, inplace=True)
10
 
11
  # Function to generate a response using the TAPEX model
12
- def response(user_question, table_data):
13
  a = datetime.datetime.now()
14
 
15
  tqa = pipeline(task="table-question-answering", model="google/tapas-large-finetuned-wtq")
16
- answer = tqa(table=table, query=question)['cells'][0]
17
 
18
  query_result = {
19
  "Resposta": answer
 
9
  df.fillna(0, inplace=True)
10
 
11
  # Function to generate a response using the TAPEX model
12
+ def response(user_question, df):
13
  a = datetime.datetime.now()
14
 
15
  tqa = pipeline(task="table-question-answering", model="google/tapas-large-finetuned-wtq")
16
+ answer = tqa(table=df, query=user_question)['answer']
17
 
18
  query_result = {
19
  "Resposta": answer