Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,14 +26,7 @@ st.markdown(style, unsafe_allow_html=True)
|
|
26 |
st.markdown('<p style="font-family:sans-serif;font-size: 1.9rem;"> HertogAI Table Q&A using TAPAS and Model Language</p>', unsafe_allow_html=True)
|
27 |
st.markdown('<p style="font-family:sans-serif;font-size: 1.0rem;"> This code is based on Jordan Skinner. I enhanced his work for Data analysis COUNT, AVG, TOTAL, MEAN & StdDev </p>', unsafe_allow_html=True)
|
28 |
st.markdown("<p style='font-family:sans-serif;font-size: 1.2rem;'>Pre-trained TAPAS model runs on max 64 rows and 32 columns data. Make sure the file data doesn't exceed these dimensions.</p>", unsafe_allow_html=True)
|
29 |
-
|
30 |
-
<style>
|
31 |
-
.custom-font {
|
32 |
-
font-family: sans-serif;
|
33 |
-
font-size: 2.5rem;
|
34 |
-
}
|
35 |
-
</style>
|
36 |
-
""", unsafe_allow_html=True)
|
37 |
|
38 |
# Initialize TAPAS pipeline
|
39 |
tqa = pipeline(task="table-question-answering",
|
@@ -47,7 +40,14 @@ t5_model = T5ForConditionalGeneration.from_pretrained("t5-small")
|
|
47 |
# File uploader in the sidebar
|
48 |
file_name = st.sidebar.file_uploader("Upload file:", type=['csv', 'xlsx'])
|
49 |
|
50 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
|
52 |
# File processing and question answering
|
53 |
if file_name is None:
|
|
|
26 |
st.markdown('<p style="font-family:sans-serif;font-size: 1.9rem;"> HertogAI Table Q&A using TAPAS and Model Language</p>', unsafe_allow_html=True)
|
27 |
st.markdown('<p style="font-family:sans-serif;font-size: 1.0rem;"> This code is based on Jordan Skinner. I enhanced his work for Data analysis COUNT, AVG, TOTAL, MEAN & StdDev </p>', unsafe_allow_html=True)
|
28 |
st.markdown("<p style='font-family:sans-serif;font-size: 1.2rem;'>Pre-trained TAPAS model runs on max 64 rows and 32 columns data. Make sure the file data doesn't exceed these dimensions.</p>", unsafe_allow_html=True)
|
29 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
|
31 |
# Initialize TAPAS pipeline
|
32 |
tqa = pipeline(task="table-question-answering",
|
|
|
40 |
# File uploader in the sidebar
|
41 |
file_name = st.sidebar.file_uploader("Upload file:", type=['csv', 'xlsx'])
|
42 |
|
43 |
+
st.markdown("""
|
44 |
+
<style>
|
45 |
+
.custom-font {
|
46 |
+
font-family: sans-serif;
|
47 |
+
font-size: 2.5rem;
|
48 |
+
}
|
49 |
+
</style>
|
50 |
+
""", unsafe_allow_html=True)
|
51 |
|
52 |
# File processing and question answering
|
53 |
if file_name is None:
|