PlayerBPlaytime's picture
Update app.py
e2f0632 verified
import gradio as gr
import sys
import os
now_dir = os.getcwd()
sys.path.append(now_dir)
from tabs.voice_blender.voice_blender import voice_blender_tab
# Assets
import assets.themes.loadThemes as loadThemes
from assets.i18n.i18n import I18nAuto
import assets.installation_checker as installation_checker
from assets.flask.server import start_flask, load_config_flask
from core import run_prerequisites_script
# Disable logging
import logging
logging.getLogger("uvicorn").setLevel(logging.WARNING)
logging.getLogger("httpx").setLevel(logging.WARNING)
run_prerequisites_script(False, True, True, True)
i18n = I18nAuto()
installation_checker.check_installation()
if load_config_flask() == True:
print("Starting Flask server")
start_flask()
my_applio = loadThemes.load_json()
if my_applio:
pass
else:
my_applio = "ParityError/Interstellar"
with gr.Blocks(theme=my_applio, title="Applio") as Applio:
gr.Markdown("# Applio")
gr.Markdown(
i18n(
"Ultimate voice cloning tool, meticulously optimized for unrivaled power, modularity, and user-friendly experience."
)
)
gr.Markdown(
i18n(
"[Support](https://discord.gg/IAHispano) — [Discord Bot](https://discord.com/oauth2/authorize?client_id=1144714449563955302&permissions=1376674695271&scope=bot%20applications.commands) — [Find Voices](https://applio.org/models) — [GitHub](https://github.com/IAHispano/Applio)"
)
)
with gr.Tab(i18n("Voice Blender")):
voice_blender_tab()
def launch_gradio(port):
Applio.launch(
favicon_path="assets/ICON.ico",
share="--share" in sys.argv,
inbrowser="--open" in sys.argv,
server_port=port,
)
if __name__ == "__main__":
Applio.launch()
# share=True