Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -19,6 +19,23 @@ tqa = pipeline(task="table-question-answering",
|
|
19 |
t5_tokenizer = T5Tokenizer.from_pretrained("t5-small")
|
20 |
t5_model = T5ForConditionalGeneration.from_pretrained("t5-small")
|
21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
# File uploader in the sidebar
|
23 |
file_name = st.sidebar.file_uploader("Upload file:", type=['csv', 'xlsx'])
|
24 |
|
|
|
19 |
t5_tokenizer = T5Tokenizer.from_pretrained("t5-small")
|
20 |
t5_model = T5ForConditionalGeneration.from_pretrained("t5-small")
|
21 |
|
22 |
+
# Title and Introduction
|
23 |
+
st.title("HERTOG-AI Table Question Answering and Data Analysis App")
|
24 |
+
st.markdown("""
|
25 |
+
This app allows you to upload a table (CSV or Excel) and ask questions about the data.
|
26 |
+
Based on your question, it will provide the corresponding answer using the **TAPAS** model and additional data processing.
|
27 |
+
|
28 |
+
### Available Features:
|
29 |
+
- **mean()**: For "average", it computes the mean of the entire numeric DataFrame.
|
30 |
+
- **sum()**: For "sum", it calculates the sum of all numeric values in the DataFrame.
|
31 |
+
- **max()**: For "max", it computes the maximum value in the DataFrame.
|
32 |
+
- **min()**: For "min", it computes the minimum value in the DataFrame.
|
33 |
+
- **count()**: For "count", it counts the non-null values in the entire DataFrame.
|
34 |
+
|
35 |
+
You can upload your data and ask questions like "What is the average of column X?" or "What is the sum of column Y?". The app will automatically process the data and give you the relevant answer.
|
36 |
+
""")
|
37 |
+
|
38 |
+
|
39 |
# File uploader in the sidebar
|
40 |
file_name = st.sidebar.file_uploader("Upload file:", type=['csv', 'xlsx'])
|
41 |
|