Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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,
|
| 13 |
a = datetime.datetime.now()
|
| 14 |
|
| 15 |
tqa = pipeline(task="table-question-answering", model="google/tapas-large-finetuned-wtq")
|
| 16 |
-
answer = tqa(table=
|
| 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
|