Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Website
Tasks
HuggingChat
Collections
Languages
Organizations
Community
Blog
Posts
Daily Papers
Hardware
Learn
Discord
Forum
GitHub
Solutions
Team & Enterprise
Hugging Face PRO
Enterprise Support
Inference Providers
Inference Endpoints
Storage Buckets
Log In
Sign Up
Spaces:
VedantDhavan
/
graphrag-benchmark
like
0
Running
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
main
graphrag-benchmark
/
utils
/
token_counter.py
VedantDhavan
Deploy GraphRAG benchmark backend
83aed13
about 2 months ago
Raw
Download with hf CLI
Copy download link
History
Blame
Contribute
Delete
Safe
84 Bytes
def
count_tokens
(
text:
str
) ->
int
:
# Approximation
return
len
(text.split())