wilmerags commited on
Commit
691ccbe
·
1 Parent(s): 61a29bd

fix: Improve handling of empty twitter handle input

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -111,7 +111,9 @@ usr = client.get_user(username=tw_user)
111
 
112
  # st.write(usr.data.id)
113
 
114
- if go_btn:
 
 
115
  with st.spinner(f"Getting to know the '{tw_user}'..."):
116
  tweets_objs = []
117
  while tw_sample >= 100:
 
111
 
112
  # st.write(usr.data.id)
113
 
114
+ tw_user = tw_user.replace(' ', '')
115
+
116
+ if go_btn and tw_user != '':
117
  with st.spinner(f"Getting to know the '{tw_user}'..."):
118
  tweets_objs = []
119
  while tw_sample >= 100: