Uniaff commited on
Commit
24e0a6d
·
verified ·
1 Parent(s): 86bcc0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -8
app.py CHANGED
@@ -6,15 +6,12 @@ import gradio as gr
6
  from pydub import AudioSegment
7
  from TTS.api import TTS
8
 
9
- license_agreement = input("You must confirm the following:\n"
10
- "\"I have purchased a commercial license from Coqui: [email protected]\"\n"
11
- "\"Otherwise, I agree to the terms of the non-commercial CPML: https://coqui.ai/cpml\" - [y/n]: ")
12
 
13
- if license_agreement.lower() != 'y':
14
- raise ValueError("Лицензионное соглашение не было подтверждено. Программа завершена.")
15
-
16
- # Импорт необходимых модулей для обеих функций
17
- os.environ["COQUI_TTS_LICENSE"] = "Y"
18
 
19
  # Глобальные переменные и настройки
20
  language_options = {
 
6
  from pydub import AudioSegment
7
  from TTS.api import TTS
8
 
 
 
 
9
 
10
+ license_agreement = os.getenv('COQUI_LICENSE_AGREEMENT', 'n') # Default to 'n'
11
+ if license_agreement == 'y':
12
+ print("Commercial license confirmed.")
13
+ else:
14
+ print("Using non-commercial CPML.")
15
 
16
  # Глобальные переменные и настройки
17
  language_options = {