Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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.
|
|
|
|
| 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"])
|