kevinlu1248's picture
init
7ebf53a
raw
history blame contribute delete
No virus
227 Bytes
import streamlit as st
import anthropic
text = st.text_area("Enter some text to tokenize using Anthropic's tokenizer: ", height=300)
if text:
num_tokens = anthropic.count_tokens(text)
f"Number of tokens: {num_tokens}"