bagbreizh
commited on
Commit
·
b7383a5
1
Parent(s):
5c5cb78
requirements
Browse files- app.py +1 -1
- requirements.txt +1 -0
app.py
CHANGED
@@ -20,7 +20,7 @@ def load_readme(dataset_name: str):
|
|
20 |
return response.text
|
21 |
|
22 |
# Function to check if the README content exceeds the token limit
|
23 |
-
def check_token_limit(content: str, max_tokens: int =
|
24 |
tokens = tokenizer.encode(content)
|
25 |
if len(tokens) > max_tokens:
|
26 |
truncated_content = tokenizer.decode(tokens[:max_tokens])
|
|
|
20 |
return response.text
|
21 |
|
22 |
# Function to check if the README content exceeds the token limit
|
23 |
+
def check_token_limit(content: str, max_tokens: int = 7500):
|
24 |
tokens = tokenizer.encode(content)
|
25 |
if len(tokens) > max_tokens:
|
26 |
truncated_content = tokenizer.decode(tokens[:max_tokens])
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
transformers
|