Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -132,6 +132,23 @@ load_dotenv()
|
|
| 132 |
config = Config()
|
| 133 |
vc = VC(config)
|
| 134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
if config.dml == True:
|
| 136 |
|
| 137 |
def forward_dml(ctx, x, scale):
|
|
@@ -624,7 +641,7 @@ def GradioSetup(UTheme=gr.themes.Soft()):
|
|
| 624 |
|
| 625 |
default_weight = names[0] if names else ''
|
| 626 |
|
| 627 |
-
with gr.Blocks(title="oItsMinez's RVC v2 WebUI", theme=gr.themes.Base(font=[gr.themes.GoogleFont("Noto Sans Thai"), "sans-serif"])) as app:
|
| 628 |
gr.Label('oItsMineZ\'s RVC v2 WebUI', show_label=False)
|
| 629 |
gr.Markdown(
|
| 630 |
"<div align='center'>\n\n"+
|
|
|
|
| 132 |
config = Config()
|
| 133 |
vc = VC(config)
|
| 134 |
|
| 135 |
+
import gradio as gr
|
| 136 |
+
|
| 137 |
+
# Force Enable Dark Mode
|
| 138 |
+
js_func = """
|
| 139 |
+
function refresh() {
|
| 140 |
+
const url = new URL(window.location);
|
| 141 |
+
|
| 142 |
+
if (url.searchParams.get('__theme') !== 'dark') {
|
| 143 |
+
url.searchParams.set('__theme', 'dark');
|
| 144 |
+
window.location.href = url.href;
|
| 145 |
+
}
|
| 146 |
+
}
|
| 147 |
+
"""
|
| 148 |
+
|
| 149 |
+
with gr.Blocks(js=js_func) as demo:
|
| 150 |
+
demo.launch()
|
| 151 |
+
|
| 152 |
if config.dml == True:
|
| 153 |
|
| 154 |
def forward_dml(ctx, x, scale):
|
|
|
|
| 641 |
|
| 642 |
default_weight = names[0] if names else ''
|
| 643 |
|
| 644 |
+
with gr.Blocks(title="oItsMinez's RVC v2 WebUI", js=js_func, theme=gr.themes.Base(font=[gr.themes.GoogleFont("Noto Sans Thai"), "sans-serif"])) as app:
|
| 645 |
gr.Label('oItsMineZ\'s RVC v2 WebUI', show_label=False)
|
| 646 |
gr.Markdown(
|
| 647 |
"<div align='center'>\n\n"+
|