Spaces:
Running
Running
Commit
·
48afdd6
1
Parent(s):
87fe8ad
Update text limit
Browse files
pages/2_custom_label_demo.py
CHANGED
@@ -55,6 +55,7 @@ text = st.text_area(
|
|
55 |
"Enter some text to analyze (max 100 tokens)", value=default_text, height=200
|
56 |
)
|
57 |
if st.button("Analyze"):
|
|
|
58 |
doc = nlp(text.replace("v", "u").replace("V", "U"))
|
59 |
len_doc = len([token for token in doc if not token.is_punct])
|
60 |
len_dcc = len(doc.spans["dcc_core"])
|
|
|
55 |
"Enter some text to analyze (max 100 tokens)", value=default_text, height=200
|
56 |
)
|
57 |
if st.button("Analyze"):
|
58 |
+
text = " ".join(text.split()[:100])
|
59 |
doc = nlp(text.replace("v", "u").replace("V", "U"))
|
60 |
len_doc = len([token for token in doc if not token.is_punct])
|
61 |
len_dcc = len(doc.spans["dcc_core"])
|