englissi commited on
Commit
8f8db0f
·
verified ·
1 Parent(s): e0d6c2d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -12
app.py CHANGED
@@ -19,21 +19,25 @@ def bulgarian_tts(bulgarian_text):
19
 
20
  return output_file
21
 
22
- with gr.Blocks() as demo:
23
- gr.Markdown("## Bulgarian Text-to-Speech (TTS)")
 
 
 
 
 
 
24
 
25
- # 단일 불가리아어 입력만 받도록 구성
26
- bulgarian_input = gr.Textbox(label="Enter Bulgarian Text:", placeholder="Здравейте")
27
- output_audio = gr.Audio(label="Generated Speech", type="filepath")
 
 
28
 
29
- generate_button = gr.Button("Generate Speech")
30
 
31
- # 불가리아어 텍스트만 받아 TTS 오디오 파일 생성
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
+