annapurnapadmaprema-ji commited on
Commit
0d159b8
1 Parent(s): 1e7aa82

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -5,6 +5,11 @@ import torch
5
  import torchaudio
6
  from io import BytesIO
7
 
 
 
 
 
 
8
  @st.cache_resource
9
  def load_model():
10
  model = MusicGen.get_pretrained("facebook/musicgen-small")
@@ -41,6 +46,8 @@ def save_audio_to_bytes(samples: torch.Tensor):
41
  audio_buffer.seek(0) # Move to the start of the buffer
42
  return audio_buffer
43
 
 
 
44
  video_background = """
45
  <style>
46
  .video-container {
@@ -96,10 +103,7 @@ def main():
96
  )
97
  st.write("Generating your music... please wait.")
98
 
99
- st.set_page_config(
100
- page_icon=":musical_note:",
101
- page_title="Music Gen"
102
- )
103
 
104
  def main():
105
  st.title("Your Music")
 
5
  import torchaudio
6
  from io import BytesIO
7
 
8
+ st.set_page_config(
9
+ page_icon=":musical_note:",
10
+ page_title="Music Gen"
11
+ )
12
+
13
  @st.cache_resource
14
  def load_model():
15
  model = MusicGen.get_pretrained("facebook/musicgen-small")
 
46
  audio_buffer.seek(0) # Move to the start of the buffer
47
  return audio_buffer
48
 
49
+
50
+
51
  video_background = """
52
  <style>
53
  .video-container {
 
103
  )
104
  st.write("Generating your music... please wait.")
105
 
106
+
 
 
 
107
 
108
  def main():
109
  st.title("Your Music")