CoolFace
Apppublic

sweepai/anthropic-tokenizer

sourceHugging Facemitupdated 3y agoView on Hugging Face
2likes
app.py8 linesDownload Raw Back to root
1import streamlit as st2import anthropic3 4text = st.text_area("Enter some text to tokenize using Anthropic's tokenizer: ", height=300)5if text:6    num_tokens = anthropic.count_tokens(text)7    f"Number of tokens: {num_tokens}"8