File size: 1,829 Bytes
fb1f7ba
 
 
 
39f384e
 
 
fb1f7ba
39f384e
fb1f7ba
 
 
39f384e
fb1f7ba
 
 
 
39f384e
 
fb1f7ba
 
39f384e
 
 
 
 
 
 
 
ff52e04
39f384e
 
fb1f7ba
 
39f384e
 
 
 
fb1f7ba
 
39f384e
 
fb1f7ba
39f384e
 
 
 
7e58c84
39f384e
e562720
fb1f7ba
 
7a6bbee
fb1f7ba
 
 
 
7a6bbee
fb1f7ba
 
 
 
 
 
 
 
 
 
 
8ce5a35
 
3f8919a
 
fb1f7ba
39f384e
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import gradio as gr
import sys
import os
import logging
# Set up logging
logging.getLogger("uvicorn").setLevel(logging.WARNING)
logging.getLogger("httpx").setLevel(logging.WARNING)

# Add current directory to sys.path
now_dir = os.getcwd()
sys.path.append(now_dir)

# Import Tabs
from tabs.inference.inference import inference_tab
from tabs.download.download import download_tab
from tabs.tts.tts import tts_tab

# Run prerequisites
from clean import start_infinite_loop
from core import run_prerequisites_script

run_prerequisites_script(
    pretraineds_v1_f0=False,
    pretraineds_v1_nof0=False,
    pretraineds_v2_f0=False,
    pretraineds_v2_nof0=False,
    models=True,
    exe=True,
)
start_infinite_loop()
# Initialize i18n
from assets.i18n.i18n import I18nAuto

i18n = I18nAuto()

# Check installation
import assets.installation_checker as installation_checker

installation_checker.check_installation()

# Load theme
import assets.themes.loadThemes as loadThemes

my_applio = loadThemes.load_theme() or "ParityError/Interstellar"

# Define Gradio interface
with gr.Blocks(
    theme=my_applio, title="WAVbot.com", css="footer{display:none !important}"
) as Applio:
    gr.Markdown("# Only upload audio as a .WAV file")
    gr.Markdown(
        i18n(
            "Convert, Upload, and Listen to Music with WAVbot.com"
        )
    )
    gr.Markdown(
        i18n(
            "[Home](https://my.wavbot.com/search) — [Instructions](https://my.wavbot.com/pages/wavbot-converter-instructions) — [About](https://my.wavbot.com/pages/about-us)"
        )
    )
    with gr.Tab(i18n("Inference")):
        inference_tab()

    with gr.Tab(i18n("TTS")):
        tts_tab()

    with gr.Tab(i18n("Download")):
        download_tab()

def launch_gradio():
    Applio.launch()


if __name__ == "__main__":
    launch_gradio()