automatic agreement to download model
Browse files300 unmodified lines301302303304305306307308309310311312313314315300 unmodified linesdef ask_tos(model_full_path):"""Ask the user to agree to the terms of service"""tos_path = os.path.join(model_full_path, "tos_agreed.txt")print(" > You must agree to the terms of service to use this model.")print(" | > Please see the terms of service at https://coqui.ai/cpml.txt")print(' | > "I have read, understood and agreed to the Terms and Conditions." - [y/n]')answer = input(" | | > ")if answer.lower() == "y":with open(tos_path, "w", encoding="utf-8") as f:f.write("I have read, understood and agreed to the Terms and Conditions.")return Truereturn False@staticmethoddef tos_agreed(model_item, model_full_path):300 unmodified lines301302303304305306307308309300 unmodified linesdef ask_tos(model_full_path):"""Ask the user to agree to the terms of service"""tos_path = os.path.join(model_full_path, "tos_agreed.txt")with open(tos_path, "w", encoding="utf-8") as f:f.write("Automatically agreed to the Terms and Conditions.")return True@staticmethoddef tos_agreed(model_item, model_full_path):
TTS/utils/manage.py+3-9