csukuangfj commited on
Commit
6572cdf
1 Parent(s): c647a88

add punct only for Chinese

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -189,7 +189,7 @@ def process(
189
  )
190
 
191
  text = decode(recognizer, filename)
192
- if add_punct == "Yes":
193
  punct = get_punct_model()
194
  text = punct.add_punctuation(text)
195
 
@@ -300,7 +300,7 @@ with demo:
300
  )
301
 
302
  punct_radio = gr.Radio(
303
- label="Whether to add punctuation (Only for Chinese and English)",
304
  choices=["Yes", "No"],
305
  value="Yes",
306
  )
 
189
  )
190
 
191
  text = decode(recognizer, filename)
192
+ if add_punct == "Yes" and language == "Chinese":
193
  punct = get_punct_model()
194
  text = punct.add_punctuation(text)
195
 
 
300
  )
301
 
302
  punct_radio = gr.Radio(
303
+ label="Whether to add punctuation (Only for Chinese)",
304
  choices=["Yes", "No"],
305
  value="Yes",
306
  )