hertogateis commited on
Commit
a8d643d
·
verified ·
1 Parent(s): 9890a4d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -3
app.py CHANGED
@@ -24,9 +24,16 @@ style = '''
24
  st.markdown(style, unsafe_allow_html=True)
25
 
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 recoded and enhanced 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,9 +47,11 @@ t5_model = T5ForConditionalGeneration.from_pretrained("t5-small")
40
  # File uploader in the sidebar
41
  file_name = st.sidebar.file_uploader("Upload file:", type=['csv', 'xlsx'])
42
 
 
 
43
  # File processing and question answering
44
  if file_name is None:
45
- st.markdown('<p class="font-family:sans-serif;font-size: 1.9rem;">Please click left side bar to upload an excel or csv file </p>', unsafe_allow_html=True)
46
  else:
47
  try:
48
  # Check file type and handle reading accordingly
 
24
  st.markdown(style, unsafe_allow_html=True)
25
 
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
+ st.markdown("""
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
  # 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:
54
+ st.markdown('<p class="custom-font">Please click left side bar to upload an excel or csv file </p>', unsafe_allow_html=True)
55
  else:
56
  try:
57
  # Check file type and handle reading accordingly