shubhendu-ghosh commited on
Commit
a460ad1
1 Parent(s): 7c856b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -13,7 +13,6 @@ def get_mp3(url):
13
  base, ext = os.path.splitext(out_file)
14
  new_file = base + '.mp3'
15
  os.rename(out_file, new_file)
16
- st.subheader("Please wait for few seconds. We are preparing the lyrics for you")
17
  return new_file
18
  def get_transcript(audio_file):
19
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
@@ -49,7 +48,10 @@ def format_lyrics(lyrics):
49
 
50
  def fetch_lyrics(url):
51
  mp3 = get_mp3(url)
 
 
52
  lyrics = get_transcript(mp3)
 
53
  lyrics = format_lyrics(lyrics)
54
  return lyrics
55
 
 
13
  base, ext = os.path.splitext(out_file)
14
  new_file = base + '.mp3'
15
  os.rename(out_file, new_file)
 
16
  return new_file
17
  def get_transcript(audio_file):
18
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
 
48
 
49
  def fetch_lyrics(url):
50
  mp3 = get_mp3(url)
51
+ status_placeholder = st.empty()
52
+ status_placeholder.subheader("Please wait for few seconds. We are preparing the lyrics for you")
53
  lyrics = get_transcript(mp3)
54
+ status_placeholder.empty()
55
  lyrics = format_lyrics(lyrics)
56
  return lyrics
57