hivecorp commited on
Commit
5232d84
·
verified ·
1 Parent(s): 1575031

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -8
app.py CHANGED
@@ -43,12 +43,14 @@ body {
43
  text-align: center;
44
  }
45
  .play-btn {
46
- background-color: #FF5722 !important;
47
- color: white;
48
- border-radius: 50px;
49
- width: 100px;
50
- height: 40px;
51
- font-size: 14px;
 
 
52
  }
53
  .playing {
54
  animation: pulse 1s infinite alternate;
@@ -70,8 +72,11 @@ with gr.Blocks(css=custom_css) as demo:
70
  if i + j < len(voices):
71
  voice = voices[i + j]
72
  with gr.Column():
73
- audio = gr.Audio(play_audio(voice["file"]), autoplay=False, elem_id=voice["name"])
74
- btn = gr.Button(f" {voice['name']}", elem_classes="play-btn")
 
 
 
75
  info = gr.Markdown(f"**{voice['name']}**<br>{voice['gender']} | {voice['country']}")
76
 
77
  def start_animation():
 
43
  text-align: center;
44
  }
45
  .play-btn {
46
+ background-color: transparent;
47
+ border: none;
48
+ font-size: 24px;
49
+ color: #FF5722;
50
+ cursor: pointer;
51
+ }
52
+ .play-btn:hover {
53
+ color: #ff8a50;
54
  }
55
  .playing {
56
  animation: pulse 1s infinite alternate;
 
72
  if i + j < len(voices):
73
  voice = voices[i + j]
74
  with gr.Column():
75
+ # Hidden Audio Component
76
+ audio = gr.Audio(play_audio(voice["file"]), autoplay=False, elem_id=voice["name"], visible=False)
77
+ # Play Button with FontAwesome Icon
78
+ btn = gr.Button("▶", elem_classes="play-btn")
79
+ # Voice Info
80
  info = gr.Markdown(f"**{voice['name']}**<br>{voice['gender']} | {voice['country']}")
81
 
82
  def start_animation():