Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1718,16 +1718,33 @@ def create_demo():
|
|
| 1718 |
--block-label-background-fill: transparent !important;
|
| 1719 |
--block-title-background-fill: transparent !important;
|
| 1720 |
--background-fill-primary: transparent !important;
|
|
|
|
| 1721 |
--block-background-fill: transparent !important;
|
|
|
|
|
|
|
|
|
|
| 1722 |
}
|
| 1723 |
|
| 1724 |
-
/* ββ
|
|
|
|
|
|
|
| 1725 |
.gradio-container .form,
|
| 1726 |
.gradio-container .panel,
|
| 1727 |
-
.gradio-container .box
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1728 |
background: rgba(15, 23, 42, 0.4) !important;
|
|
|
|
| 1729 |
backdrop-filter: blur(20px) !important;
|
| 1730 |
-webkit-backdrop-filter: blur(20px) !important;
|
|
|
|
|
|
|
|
|
|
| 1731 |
border-radius: 24px !important;
|
| 1732 |
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
| 1733 |
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
|
|
@@ -2376,11 +2393,27 @@ if __name__ == "__main__":
|
|
| 2376 |
except Exception:
|
| 2377 |
voice_style = tts.get_voice_style(tts.voice_style_names[0])
|
| 2378 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2379 |
demo = create_demo()
|
| 2380 |
if IS_HF:
|
| 2381 |
-
demo.launch()
|
| 2382 |
else:
|
| 2383 |
-
demo.launch(server_name="0.0.0.0", server_port=7865)
|
| 2384 |
|
| 2385 |
|
| 2386 |
|
|
|
|
| 1718 |
--block-label-background-fill: transparent !important;
|
| 1719 |
--block-title-background-fill: transparent !important;
|
| 1720 |
--background-fill-primary: transparent !important;
|
| 1721 |
+
--background-fill-secondary: transparent !important;
|
| 1722 |
--block-background-fill: transparent !important;
|
| 1723 |
+
--input-background-fill: rgba(0, 0, 0, 0.2) !important;
|
| 1724 |
+
--input-background-fill-focus: rgba(0, 0, 0, 0.3) !important;
|
| 1725 |
+
--panel-background-fill: transparent !important;
|
| 1726 |
}
|
| 1727 |
|
| 1728 |
+
/* ββ AGGRESSIVE BACKGROUND OVERRIDES FOR FIREFOX & ALL ELEMENTS ββ */
|
| 1729 |
+
.gradio-container .tabitem,
|
| 1730 |
+
.gradio-container .wrap,
|
| 1731 |
.gradio-container .form,
|
| 1732 |
.gradio-container .panel,
|
| 1733 |
+
.gradio-container .box,
|
| 1734 |
+
.gradio-container input,
|
| 1735 |
+
.gradio-container textarea,
|
| 1736 |
+
.gradio-container select,
|
| 1737 |
+
.gradio-container .dropdown-container,
|
| 1738 |
+
.gradio-container .file-preview,
|
| 1739 |
+
.gradio-container .upload-button,
|
| 1740 |
+
.gradio-container .block {
|
| 1741 |
background: rgba(15, 23, 42, 0.4) !important;
|
| 1742 |
+
background-color: rgba(15, 23, 42, 0.4) !important;
|
| 1743 |
backdrop-filter: blur(20px) !important;
|
| 1744 |
-webkit-backdrop-filter: blur(20px) !important;
|
| 1745 |
+
}
|
| 1746 |
+
|
| 1747 |
+
.gradio-container .form, .gradio-container .panel, .gradio-container .box {
|
| 1748 |
border-radius: 24px !important;
|
| 1749 |
border: 1px solid rgba(255, 255, 255, 0.1) !important;
|
| 1750 |
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
|
|
|
|
| 2393 |
except Exception:
|
| 2394 |
voice_style = tts.get_voice_style(tts.voice_style_names[0])
|
| 2395 |
|
| 2396 |
+
print("Generating audio for BOOTSTRAP_VOCAB...")
|
| 2397 |
+
for item in BOOTSTRAP_VOCAB:
|
| 2398 |
+
korean_word = item.get("korean", "")
|
| 2399 |
+
if korean_word and tts is not None:
|
| 2400 |
+
try:
|
| 2401 |
+
wav, dur = tts.synthesize(
|
| 2402 |
+
text=korean_word,
|
| 2403 |
+
voice_style=voice_style,
|
| 2404 |
+
language="ko",
|
| 2405 |
+
speed=0.9
|
| 2406 |
+
)
|
| 2407 |
+
item["audio_uri"] = numpy_to_base64_audio(wav, tts.sample_rate)
|
| 2408 |
+
except Exception as e:
|
| 2409 |
+
print(f"Failed to generate audio for {korean_word}: {e}")
|
| 2410 |
+
|
| 2411 |
+
|
| 2412 |
demo = create_demo()
|
| 2413 |
if IS_HF:
|
| 2414 |
+
demo.launch(allowed_paths=[LOG_DIR])
|
| 2415 |
else:
|
| 2416 |
+
demo.launch(server_name="0.0.0.0", server_port=7865, allowed_paths=[LOG_DIR])
|
| 2417 |
|
| 2418 |
|
| 2419 |
|