keshan commited on
Commit
8f192a0
1 Parent(s): 9b48875

updating model loading msg

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -10,10 +10,11 @@ max_len = st.number_input('Length of the sentence ', 5, 300, 100)
10
 
11
  go = st.button('Generate')
12
 
13
- st.write('Waiting for the model to load.....')
14
- model = AutoModelForCausalLM.from_pretrained('flax-community/Sinhala-gpt2')
15
- tokenizer = AutoTokenizer.from_pretrained('flax-community/Sinhala-gpt2')
16
- st.write('Model loaded!!')
 
17
 
18
  if go:
19
  try:
 
10
 
11
  go = st.button('Generate')
12
 
13
+ with st.spinner('Waiting for the model to load.....'):
14
+ model = AutoModelForCausalLM.from_pretrained('flax-community/Sinhala-gpt2')
15
+ tokenizer = AutoTokenizer.from_pretrained('flax-community/Sinhala-gpt2')
16
+ st.success('Model loaded!!')
17
+
18
 
19
  if go:
20
  try: