wjjessen commited on
Commit
2d3e634
1 Parent(s): 990e81e

update code

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -8,7 +8,7 @@ from PyPDF2 import PdfReader
8
  import streamlit as st
9
  import torch
10
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, AutoModelForCausalLM
11
-
12
 
13
  # notes
14
  # https://huggingface.co/docs/transformers/pad_truncation
@@ -160,7 +160,9 @@ def main():
160
  )
161
  pdf_viewer = displayPDF(filepath)
162
  with col2:
163
- with st.spinner("Please wait..."):
 
 
164
  summary = llm_pipeline(tokenizer, base_model, input_text)
165
  postproc_text_length = postproc_count(summary)
166
  st.info(
 
8
  import streamlit as st
9
  import torch
10
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, AutoModelForCausalLM
11
+ import time
12
 
13
  # notes
14
  # https://huggingface.co/docs/transformers/pad_truncation
 
160
  )
161
  pdf_viewer = displayPDF(filepath)
162
  with col2:
163
+ with st.spinner("Loading LLM..."):
164
+ time.sleep(5)
165
+ with st.spinner("Summarizing..."):
166
  summary = llm_pipeline(tokenizer, base_model, input_text)
167
  postproc_text_length = postproc_count(summary)
168
  st.info(