barreloflube
commited on
Commit
•
adc7d13
1
Parent(s):
a2a3c89
Refactor submodule URL for CosyVoice TTS
Browse files- app.py +1 -1
- config.py +6 -2
- tools/events.py +0 -0
- tools/handlers.py +0 -0
- tools/load_models.py +0 -0
- tools/models.py +0 -0
- tools/ui.py +9 -0
app.py
CHANGED
@@ -13,7 +13,7 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css) as demo:
|
|
13 |
Unleash your creativity with our multi-modal AI platform.
|
14 |
[![Sync code to HF Space](https://github.com/mantrakp04/aai/actions/workflows/hf-space.yml/badge.svg)](https://github.com/mantrakp04/aai/actions/workflows/hf-space.yml)
|
15 |
""")
|
16 |
-
|
17 |
# Tabs
|
18 |
with gr.Tabs():
|
19 |
with gr.Tab(label="🖼️ Image"):
|
|
|
13 |
Unleash your creativity with our multi-modal AI platform.
|
14 |
[![Sync code to HF Space](https://github.com/mantrakp04/aai/actions/workflows/hf-space.yml/badge.svg)](https://github.com/mantrakp04/aai/actions/workflows/hf-space.yml)
|
15 |
""")
|
16 |
+
|
17 |
# Tabs
|
18 |
with gr.Tabs():
|
19 |
with gr.Tab(label="🖼️ Image"):
|
config.py
CHANGED
@@ -8,14 +8,17 @@ import torch
|
|
8 |
# Setup Repo
|
9 |
|
10 |
# Audios
|
11 |
-
# os.environ['PYTHONPATH'] = f'{os.path.dirname(__file__)}/modules/CosyVoice/third_party/Matcha-TTS:{os.environ.get("PYTHONPATH", "")}' # add tabs/audios/modules/CosyVoice/third_party/Matcha-TTS to PYTHONPATH
|
12 |
-
# os.environ['PYTHONPATH'] = f'{os.path.dirname(__file__)}/modules/CosyVoice:{os.environ.get("PYTHONPATH", "")}' # add tabs/audios/modules/CosyVoice to PYTHONPATH
|
13 |
matcha_tts_path = os.path.join(os.getcwd(), 'tabs', 'audios', 'modules', 'CosyVoice', 'third_party', 'Matcha-TTS')
|
14 |
cosyvoice_path = os.path.join(os.getcwd(), 'tabs', 'audios', 'modules', 'CosyVoice')
|
15 |
sys.path.append(matcha_tts_path)
|
16 |
sys.path.append(cosyvoice_path)
|
17 |
|
|
|
|
|
|
|
18 |
|
|
|
|
|
19 |
css = """
|
20 |
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');
|
21 |
body {
|
@@ -37,6 +40,7 @@ body {
|
|
37 |
"""
|
38 |
|
39 |
|
|
|
40 |
class Config:
|
41 |
# General
|
42 |
SECRET_KEY = os.environ.get('SECRET_KEY', '12345678')
|
|
|
8 |
# Setup Repo
|
9 |
|
10 |
# Audios
|
|
|
|
|
11 |
matcha_tts_path = os.path.join(os.getcwd(), 'tabs', 'audios', 'modules', 'CosyVoice', 'third_party', 'Matcha-TTS')
|
12 |
cosyvoice_path = os.path.join(os.getcwd(), 'tabs', 'audios', 'modules', 'CosyVoice')
|
13 |
sys.path.append(matcha_tts_path)
|
14 |
sys.path.append(cosyvoice_path)
|
15 |
|
16 |
+
# Setup ENV
|
17 |
+
os.environ['HF_HOME'] = os.path.join(os.getcwd(), '.cache')
|
18 |
+
os.makedirs(os.environ['HF_HOME'], exist_ok=True)
|
19 |
|
20 |
+
|
21 |
+
# CSS
|
22 |
css = """
|
23 |
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');
|
24 |
body {
|
|
|
40 |
"""
|
41 |
|
42 |
|
43 |
+
# Config
|
44 |
class Config:
|
45 |
# General
|
46 |
SECRET_KEY = os.environ.get('SECRET_KEY', '12345678')
|
tools/events.py
ADDED
File without changes
|
tools/handlers.py
ADDED
File without changes
|
tools/load_models.py
ADDED
File without changes
|
tools/models.py
ADDED
File without changes
|
tools/ui.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""
|
2 |
+
# Tool List
|
3 |
+
|
4 |
+
- [ ] Upscale
|
5 |
+
- [ ] Remove Background
|
6 |
+
- [ ] Remove Object
|
7 |
+
- [ ] Captions
|
8 |
+
- [ ] Prompt Generator
|
9 |
+
"""
|