forked from mrq/ai-voice-cloning
Merge pull request 'Using zfill in utils.pad' (#5) from lightmare/ai-voice-cloning:zfill into master
Reviewed-on: mrq/ai-voice-cloning#5
This commit is contained in:
commit
8dddb560e1
|
@ -120,11 +120,7 @@ def setup_args():
|
|||
return args
|
||||
|
||||
def pad(num, zeroes):
|
||||
s = ""
|
||||
for i in range(zeroes,0,-1):
|
||||
if num < 10 ** i:
|
||||
s = f"{s}0"
|
||||
return f"{s}{num}"
|
||||
return str(num).zfill(zeroes+1)
|
||||
|
||||
def generate(
|
||||
text,
|
||||
|
|
Loading…
Reference in New Issue
Block a user