mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-06 07:03:37 +00:00
Minor cleanup
This commit is contained in:
parent
843de8b8a8
commit
2e4232e02b
2 changed files with 1 additions and 9 deletions
|
|
@ -81,14 +81,6 @@ def atoi(text):
|
|||
return int(text) if text.isdigit() else text.lower()
|
||||
|
||||
|
||||
# Replace multiple string pairs in a string
|
||||
def replace_all(text, dic):
|
||||
for i, j in dic.items():
|
||||
text = text.replace(i, j)
|
||||
|
||||
return text
|
||||
|
||||
|
||||
def natural_keys(text):
|
||||
return [atoi(c) for c in re.split(r'(\d+)', text)]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue