Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -19,21 +19,25 @@ def bulgarian_tts(bulgarian_text):
|
|
19 |
|
20 |
return output_file
|
21 |
|
22 |
-
with gr.Blocks(
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
|
|
|
|
28 |
|
29 |
-
|
30 |
|
31 |
-
|
32 |
-
generate_button.click(
|
33 |
-
bulgarian_tts,
|
34 |
-
inputs=bulgarian_input,
|
35 |
-
outputs=output_audio
|
36 |
-
)
|
37 |
|
38 |
if __name__ == "__main__":
|
39 |
demo.launch()
|
|
|
|
19 |
|
20 |
return output_file
|
21 |
|
22 |
+
with gr.Blocks(css="""
|
23 |
+
.gradio-container { font-family: 'Arial', sans-serif; }
|
24 |
+
.title { text-align: center; font-size: 24px; font-weight: bold; }
|
25 |
+
.textbox { border-radius: 8px; padding: 10px; }
|
26 |
+
.button { background-color: #4CAF50; color: white; border-radius: 8px; padding: 10px 15px; }
|
27 |
+
.button:hover { background-color: #45a049; }
|
28 |
+
""") as demo:
|
29 |
+
gr.Markdown("""<div class='title'>🇧🇬 Bulgarian Text-to-Speech (TTS)</div>""", unsafe_allow_html=True)
|
30 |
|
31 |
+
with gr.Row():
|
32 |
+
bulgarian_input = gr.Textbox(label="Enter Bulgarian Text:", placeholder="Здравейте", elem_classes=["textbox"])
|
33 |
+
|
34 |
+
with gr.Row():
|
35 |
+
generate_button = gr.Button("🎤 Generate Speech", elem_classes=["button"])
|
36 |
|
37 |
+
output_audio = gr.Audio(label="Generated Speech", type="filepath")
|
38 |
|
39 |
+
generate_button.click(bulgarian_tts, inputs=bulgarian_input, outputs=output_audio)
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
if __name__ == "__main__":
|
42 |
demo.launch()
|
43 |
+
|