Pippoz commited on
Commit
38a4071
1 Parent(s): bca744c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ import torch
5
 
6
  st.markdown('## Text-generation OPT from Meta ')
7
 
8
- @st.cache(allow_output_mutation=True)
9
  def get_model():
10
  return pipeline('text-generation', model=model, skip_special_tokens=True)
11
 
@@ -24,7 +24,7 @@ with col2:
24
  model = 'facebook/opt-125m'
25
 
26
  if select_model:
27
- st.warning('Loading Model... (This may take a while)')
28
  generator = get_model()
29
  st.success('Model loaded correctly!')
30
 
 
5
 
6
  st.markdown('## Text-generation OPT from Meta ')
7
 
8
+ @st.cache(allow_output_mutation=True,show_spinner=False)
9
  def get_model():
10
  return pipeline('text-generation', model=model, skip_special_tokens=True)
11
 
 
24
  model = 'facebook/opt-125m'
25
 
26
  if select_model:
27
+ with st.spinner('Loading Model... (This may take a while)')
28
  generator = get_model()
29
  st.success('Model loaded correctly!')
30