Adam3 commited on
Commit
191df25
·
verified ·
1 Parent(s): 3f78401

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +62 -0
app.py ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import sys
3
+ import os
4
+
5
+ now_dir = os.getcwd()
6
+ sys.path.append(now_dir)
7
+
8
+ from assets.i18n.i18n import I18nAuto
9
+
10
+ i18n = I18nAuto()
11
+
12
+ from tabs.inference.inference import inference_tab
13
+ from tabs.train.train import train_tab
14
+ from tabs.extra.extra import extra_tab
15
+ from tabs.report.report import report_tab
16
+ from tabs.download.download import download_tab
17
+ from tabs.tts.tts import tts_tab
18
+ from assets.discord_presence import rich_presence
19
+
20
+ rich_presence()
21
+
22
+ try:
23
+ from tensorflow.python.client import device_lib
24
+
25
+ gpus = [device.name for device in device_lib.list_local_devices() if device.device_type == "GPU"]
26
+ except ImportError:
27
+ gpus = []
28
+
29
+ with gr.Blocks(theme="ParityError/Interstellar", title="Applio") as Applio:
30
+ gr.Markdown("# Applio")
31
+ gr.Markdown(
32
+ i18n(
33
+ "Ultimate voice cloning tool, meticulously optimized for unrivaled power, modularity, and user-friendly experience."
34
+ )
35
+ )
36
+ gr.Markdown(
37
+ i18n(
38
+ "[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)"
39
+ )
40
+ )
41
+ with gr.Tab(i18n("Inference")):
42
+ inference_tab()
43
+
44
+ if gpus:
45
+ with gr.Tab(i18n("Train")):
46
+ train_tab()
47
+
48
+ with gr.Tab(i18n("TTS")):
49
+ tts_tab()
50
+
51
+ with gr.Tab(i18n("Extra")):
52
+ extra_tab()
53
+
54
+ with gr.Tab(i18n("Download")):
55
+ download_tab()
56
+
57
+ with gr.Tab(i18n("Report a Bug")):
58
+ report_tab()
59
+
60
+ if __name__ == "__main__":
61
+ Applio.launch()
62
+ # share=True