Spaces:
Sleeping
Sleeping
File size: 792 Bytes
5006d20 5becb6b 5006d20 fae8398 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import os
import gradio as gr
from apps.audio_cloning.main import main as audio_cloning
from apps.dev.main import main as dev
with gr.Blocks(theme=gr.themes.Soft()) as demo:
audio_cloning()
with demo.route(name="Dev", path="/dev"):
dev()
if __name__ == "__main__":
# demo.queue(max_size=2, concurrency_limit=2, concurrency_id="gpu_queue")
if os.getenv("ENV") == "dev":
demo.launch(share=False)
else:
username = os.getenv("USER")
password = os.getenv("PASSWORD")
if not username or not password:
raise RuntimeError(
"Environment variables USER and PASSWORD must be set for basic authentication."
)
auth = (username, password)
demo.launch(share=False, auth=auth, ssr_mode=False)
|