Spaces:
Runtime error
Runtime error
updating model loading msg
Browse files
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.
|
14 |
-
model = AutoModelForCausalLM.from_pretrained('flax-community/Sinhala-gpt2')
|
15 |
-
tokenizer = AutoTokenizer.from_pretrained('flax-community/Sinhala-gpt2')
|
16 |
-
st.
|
|
|
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:
|