csukuangfj commited on
Commit
11a30bd
·
1 Parent(s): d4f9156
Files changed (1) hide show
  1. app.py +4 -2
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
- MyPrint(f"Input text {len(text)}: {text[:1000]}. sid: {sid}, speed: {speed}")
140
- if len(text) > 1000:
 
 
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>