Update test.py
Browse files
test.py
CHANGED
|
@@ -86,7 +86,9 @@ def create_to_symbol_fn(hps):
|
|
| 86 |
|
| 87 |
return to_symbol_fn
|
| 88 |
|
| 89 |
-
def main(input):
|
|
|
|
|
|
|
| 90 |
models_tts = []
|
| 91 |
models_vc = []
|
| 92 |
models_soft_vc = []
|
|
@@ -128,7 +130,7 @@ def main(input):
|
|
| 128 |
print(models_tts)
|
| 129 |
|
| 130 |
|
| 131 |
-
demo = gr.Interface(fn=main, inputs="text", outputs="audio")
|
| 132 |
|
| 133 |
# outputs=gr.outputs.Textbox(label="outputAudio"))
|
| 134 |
|
|
|
|
| 86 |
|
| 87 |
return to_symbol_fn
|
| 88 |
|
| 89 |
+
def main(input, authorization):
|
| 90 |
+
if os.environ['API_TOKEN'] != authorization:
|
| 91 |
+
return
|
| 92 |
models_tts = []
|
| 93 |
models_vc = []
|
| 94 |
models_soft_vc = []
|
|
|
|
| 130 |
print(models_tts)
|
| 131 |
|
| 132 |
|
| 133 |
+
demo = gr.Interface(fn=main, inputs=["text", "text"], outputs="audio")
|
| 134 |
|
| 135 |
# outputs=gr.outputs.Textbox(label="outputAudio"))
|
| 136 |
|