Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,9 @@ from transformers import pipeline
|
|
6 |
df = pd.read_excel('CG.xlsx')
|
7 |
|
8 |
def response(user_question):
|
9 |
-
tqa = pipeline(task="table-question-answering", model="google/tapas-large-finetuned-wtq")
|
10 |
-
table_data = df.
|
|
|
11 |
resposta = tqa(table=table_data , query=user_question)['cells'][0]
|
12 |
return resposta
|
13 |
|
|
|
6 |
df = pd.read_excel('CG.xlsx')
|
7 |
|
8 |
def response(user_question):
|
9 |
+
tqa = pipeline(task="table-question-answering", model="google/tapas-large-finetuned-wtq")
|
10 |
+
table_data = df.fillna(0, inplace=True)
|
11 |
+
table_data = table_data.astype(str)
|
12 |
resposta = tqa(table=table_data , query=user_question)['cells'][0]
|
13 |
return resposta
|
14 |
|