Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -7,8 +7,9 @@ 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 |
-
|
11 |
-
|
|
|
12 |
|
13 |
# Streamlit interface
|
14 |
st.markdown("""
|
|
|
7 |
|
8 |
def response(user_question):
|
9 |
tqa = pipeline(task="table-question-answering", model="google/tapas-large-finetuned-wtq")
|
10 |
+
table_data = df.as_type(str)
|
11 |
+
resposta = tqa(table=table_data , query=user_question)['cells'][0]
|
12 |
+
return resposta
|
13 |
|
14 |
# Streamlit interface
|
15 |
st.markdown("""
|