Allow superbooga to download URLs in parallel

This commit is contained in:
oobabooga 2023-05-12 14:19:55 -03:00
parent df37ba5256
commit 146a9cb393
3 changed files with 61 additions and 20 deletions

View file

@ -146,12 +146,13 @@ def load_prompt(fname):
}
output += utils.replace_all(data['turn_template'].split('<|bot-message|>')[0], replacements)
return output
return output.rstrip(' ')
else:
with open(Path(f'prompts/{fname}.txt'), 'r', encoding='utf-8') as f:
text = f.read()
if text[-1] == '\n':
text = text[:-1]
return text