wjjessen commited on
Commit
bb2f7b8
·
1 Parent(s): a465ea1

update code

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -152,19 +152,19 @@ def main():
152
  with open(filepath, "wb") as temp_file:
153
  temp_file.write(uploaded_file.read())
154
  with col1:
155
- input_text, text_length = preproc_count(filepath, skipfirst, skiplast)
156
  st.info(
157
  "Uploaded PDF  |  Number of words: "
158
- f"{text_length:,}"
159
  )
160
  pdf_viewer = displayPDF(filepath)
161
  with col2:
162
  with st.spinner("Please wait..."):
163
  summary = llm_pipeline(tokenizer, base_model, input_text)
164
- text_length = postproc_count(summary)
165
  st.info(
166
  "PDF Summary  |  Number of words: "
167
- f"{text_length:,}"
168
  )
169
  st.success(summary)
170
 
 
152
  with open(filepath, "wb") as temp_file:
153
  temp_file.write(uploaded_file.read())
154
  with col1:
155
+ input_text, preproc_text_length = preproc_count(filepath, skipfirst, skiplast)
156
  st.info(
157
  "Uploaded PDF  |  Number of words: "
158
+ f"{preproc_text_length:,}"
159
  )
160
  pdf_viewer = displayPDF(filepath)
161
  with col2:
162
  with st.spinner("Please wait..."):
163
  summary = llm_pipeline(tokenizer, base_model, input_text)
164
+ postproc_text_length = postproc_count(summary)
165
  st.info(
166
  "PDF Summary  |  Number of words: "
167
+ f"{postproc_text_length:,}"
168
  )
169
  st.success(summary)
170