namaai commited on
Commit
a3a2a4b
·
verified ·
1 Parent(s): d420e81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -86,7 +86,8 @@ def main():
86
  text_input = st.text_area("Enter text to calculate tokens:")
87
  if text_input:
88
  token_count = count_tokens(text_input)
89
- st.write(f'The input text contains {token_count} tokens.')
 
90
 
91
  # File uploader
92
  uploaded_file = st.file_uploader("Choose a file", type=["csv", "txt", "pdf"])
 
86
  text_input = st.text_area("Enter text to calculate tokens:")
87
  if text_input:
88
  token_count = count_tokens(text_input)
89
+ if st.button("Count"):
90
+ st.write(f'The input text contains {token_count} tokens.')
91
 
92
  # File uploader
93
  uploaded_file = st.file_uploader("Choose a file", type=["csv", "txt", "pdf"])