cs2764 commited on
Commit
2345368
·
verified ·
1 Parent(s): 222dec9

Upload 2 files

Browse files

Add text clean feature

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -65,12 +65,12 @@ def estimate_text_duration(text):
65
  if space_count / total_len < 0.1:
66
  # Approx 300 chars per minute for Chinese
67
  duration = total_len / 300
68
- logger.info(f"Estimated duration (char-based): {duration:.2f} min ({total_len} chars)")
69
  else:
70
  # Approx 150 words per minute for English
71
  word_count = len(text.split())
72
  duration = word_count / 150
73
- logger.info(f"Estimated duration (word-based): {duration:.2f} min ({word_count} words)")
74
 
75
  return duration
76
 
 
65
  if space_count / total_len < 0.1:
66
  # Approx 300 chars per minute for Chinese
67
  duration = total_len / 300
68
+ # logger.debug(f"Estimated duration (char-based): {duration:.2f} min ({total_len} chars)")
69
  else:
70
  # Approx 150 words per minute for English
71
  word_count = len(text.split())
72
  duration = word_count / 150
73
+ # logger.debug(f"Estimated duration (word-based): {duration:.2f} min ({word_count} words)")
74
 
75
  return duration
76