Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -5,15 +5,15 @@ from typing import Optional
|
|
5 |
import numpy as np
|
6 |
import torch
|
7 |
|
8 |
-
from transformers import
|
9 |
from transformers.generation.streamers import BaseStreamer
|
10 |
|
11 |
import gradio as gr
|
12 |
import spaces
|
13 |
|
14 |
|
15 |
-
model =
|
16 |
-
processor =
|
17 |
|
18 |
title = "MusicGen Streaming"
|
19 |
|
|
|
5 |
import numpy as np
|
6 |
import torch
|
7 |
|
8 |
+
from transformers import MusicgenMelodyForConditionalGeneration, AutoProcessor, set_seed
|
9 |
from transformers.generation.streamers import BaseStreamer
|
10 |
|
11 |
import gradio as gr
|
12 |
import spaces
|
13 |
|
14 |
|
15 |
+
model = MusicgenMelodyForConditionalGeneration.from_pretrained("facebook/musicgen-melody")
|
16 |
+
processor = AutoProcessor.from_pretrained("facebook/musicgen-melody")
|
17 |
|
18 |
title = "MusicGen Streaming"
|
19 |
|