justheuristic commited on
Commit
64ad5b5
·
1 Parent(s): 2b35d4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -13,7 +13,8 @@ def process(text):
13
  text = st.text_area("TEXT HERE")
14
 
15
 
16
- t = st.empty()
17
- for i in range(len(text) + 1):
18
- t.markdown(f"## {text[0:i]}...")
19
- time.sleep(1.0)
 
 
13
  text = st.text_area("TEXT HERE")
14
 
15
 
16
+ if len(text.split()) > 0: # note: this if avoids sleep during first loading time
17
+ t = st.empty()
18
+ for i in range(len(text) + 1):
19
+ t.markdown(f"## {text[0:i]}...")
20
+ time.sleep(1.0)