Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
-
from
|
3 |
|
4 |
# Load the MusicGen model
|
5 |
model = MusicGen.from_pretrained("facebook/musicgen-medium")
|
@@ -11,7 +11,6 @@ def generate_music(prompt):
|
|
11 |
|
12 |
def process_song(input_audio):
|
13 |
# Process the input audio file and generate extended music
|
14 |
-
# Here, you can implement logic to create a prompt from the audio
|
15 |
prompt = "Generate a continuation for the song based on its style." # Example prompt
|
16 |
extended_music = generate_music(prompt)
|
17 |
return extended_music
|
|
|
1 |
import gradio as gr
|
2 |
+
from audiocraft.models import MusicGen
|
3 |
|
4 |
# Load the MusicGen model
|
5 |
model = MusicGen.from_pretrained("facebook/musicgen-medium")
|
|
|
11 |
|
12 |
def process_song(input_audio):
|
13 |
# Process the input audio file and generate extended music
|
|
|
14 |
prompt = "Generate a continuation for the song based on its style." # Example prompt
|
15 |
extended_music = generate_music(prompt)
|
16 |
return extended_music
|