wgcv commited on
Commit
85ed173
·
1 Parent(s): 6bf7060

Remove spinner insde sidebar

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -34,14 +34,14 @@ def load_tab():
34
  if(text == ""):
35
  print("error")
36
  else:
37
- with st.sidebar.spinner('Wait for it...'):
38
  st.sidebar.write(f'**<title>:** {title}')
39
  time.sleep(1)
40
- with st.sidebar.spinner('Wait for it...'):
41
  st.sidebar.write(f'**T5-small:** {predict_model_t5(text)}')
42
- with st.sidebar.spinner('Wait for it...'):
43
  st.sidebar.sidebar.write(f'**Pegasus xsum:** {predict_model_pegasus(text)}')
44
- with st.sidebar.spinner('Wait for it...'):
45
  st.sidebar.write(f'**Bart-Large-Cnn:** {predict_model_bart(text)}')
46
  else:
47
  error_message = st.sidebar.error(f'Is not a valid URL. Please enter a valid URL.')
@@ -203,16 +203,16 @@ Given the substantial volume of data, training a model from scratch was deemed i
203
 
204
 
205
  with st.sidebar.status("Loading models...", expanded=True, state="complete") as models:
206
- st.write("Loading 1/3 (https://huggingface.co/wgcv/tidy-tab-model-t5-small)")
207
  get_tidy_tab_t5()
208
- st.write("Loaded T5-Small...")
209
 
210
- st.write("Loading 2/3 (https://huggingface.co/wgcv/tidy-tab-model-pegasus-xsum)")
211
  get_tidy_tab_pegasus()
212
- st.write("Loaded Pegasus xsum...")
213
 
214
- st.write("Loading 3/3 (https://huggingface.co/wgcv/tidy-tab-model-bart-large-cnn)")
215
  load_model_bart()
216
- st.write("Loaded Pegasus Bart-Large...")
217
 
218
  models.update(label="All models loaded!", state="complete", expanded=False)
 
34
  if(text == ""):
35
  print("error")
36
  else:
37
+ with st.spinner('Wait for it...'):
38
  st.sidebar.write(f'**<title>:** {title}')
39
  time.sleep(1)
40
+ with st.spinner('Wait for it...'):
41
  st.sidebar.write(f'**T5-small:** {predict_model_t5(text)}')
42
+ with st.spinner('Wait for it...'):
43
  st.sidebar.sidebar.write(f'**Pegasus xsum:** {predict_model_pegasus(text)}')
44
+ with st.spinner('Wait for it...'):
45
  st.sidebar.write(f'**Bart-Large-Cnn:** {predict_model_bart(text)}')
46
  else:
47
  error_message = st.sidebar.error(f'Is not a valid URL. Please enter a valid URL.')
 
203
 
204
 
205
  with st.sidebar.status("Loading models...", expanded=True, state="complete") as models:
206
+ st.write("Loading 1/3 (https://huggingface.co/wgcv/tidy-tab-model-t5-small)...")
207
  get_tidy_tab_t5()
208
+ st.write("Loaded T5-Small")
209
 
210
+ st.write("Loading 2/3 (https://huggingface.co/wgcv/tidy-tab-model-pegasus-xsum)...")
211
  get_tidy_tab_pegasus()
212
+ st.write("Loaded Pegasus xsum")
213
 
214
+ st.write("Loading 3/3 (https://huggingface.co/wgcv/tidy-tab-model-bart-large-cnn)...")
215
  load_model_bart()
216
+ st.write("Loaded Pegasus Bart-Large")
217
 
218
  models.update(label="All models loaded!", state="complete", expanded=False)