kevinlu1248 commited on
Commit
7ebf53a
1 Parent(s): 5f60ee6
Files changed (1) hide show
  1. app.py +7 -0
app.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import anthropic
3
+
4
+ text = st.text_area("Enter some text to tokenize using Anthropic's tokenizer: ", height=300)
5
+ if text:
6
+ num_tokens = anthropic.count_tokens(text)
7
+ f"Number of tokens: {num_tokens}"