Plachta commited on
Commit
9ffacf8
1 Parent(s): 9445a79

Revert "Fix empty-text-is-given error when text contains \n"

Browse files

This reverts commit 9445a7930b8ce4ccaf833c2b682dc388f3ff9772.

Files changed (1) hide show
  1. app.py +0 -2
app.py CHANGED
@@ -192,7 +192,6 @@ def make_prompt(name, wav, sr, save=True):
192
 
193
  @torch.no_grad()
194
  def infer_from_audio(text, language, accent, audio_prompt, record_audio_prompt, transcript_content):
195
- text = text.replace("\n", "")
196
  if len(text) > 150:
197
  return "Rejected, Text too long (should be less than 150 characters)", None
198
  audio_prompt = audio_prompt if audio_prompt is not None else record_audio_prompt
@@ -269,7 +268,6 @@ def infer_from_audio(text, language, accent, audio_prompt, record_audio_prompt,
269
 
270
  @torch.no_grad()
271
  def infer_from_prompt(text, language, accent, preset_prompt, prompt_file):
272
- text = text.replace("\n", "")
273
  if len(text) > 150:
274
  return "Rejected, Text too long (should be less than 150 characters)", None
275
  clear_prompts()
 
192
 
193
  @torch.no_grad()
194
  def infer_from_audio(text, language, accent, audio_prompt, record_audio_prompt, transcript_content):
 
195
  if len(text) > 150:
196
  return "Rejected, Text too long (should be less than 150 characters)", None
197
  audio_prompt = audio_prompt if audio_prompt is not None else record_audio_prompt
 
268
 
269
  @torch.no_grad()
270
  def infer_from_prompt(text, language, accent, preset_prompt, prompt_file):
 
271
  if len(text) > 150:
272
  return "Rejected, Text too long (should be less than 150 characters)", None
273
  clear_prompts()