Spaces:
Running
Running
Commit
·
11a30bd
1
Parent(s):
d4f9156
use 4000
Browse files
app.py
CHANGED
@@ -136,8 +136,10 @@ def build_html_output(s: str, style: str = "result_item_success"):
|
|
136 |
|
137 |
|
138 |
def process(language: str, repo_id: str, text: str, sid: str, speed: float):
|
139 |
-
|
140 |
-
|
|
|
|
|
141 |
info = """
|
142 |
To ensure this space is responsive, please use short text for testing.<br/>
|
143 |
You can run this space locally to process long texts.<br>
|
|
|
136 |
|
137 |
|
138 |
def process(language: str, repo_id: str, text: str, sid: str, speed: float):
|
139 |
+
max_len = 4000
|
140 |
+
MyPrint(f"Input text {len(text)}: {text[:max_len]}. sid: {sid}, speed: {speed}")
|
141 |
+
if len(text) > max_len:
|
142 |
+
MyPrint(f"Too long! {len(text)}")
|
143 |
info = """
|
144 |
To ensure this space is responsive, please use short text for testing.<br/>
|
145 |
You can run this space locally to process long texts.<br>
|