Commit
·
98fb2de
1
Parent(s):
1208e66
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,3 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
-
import spaces
|
| 3 |
-
|
| 4 |
from queue import Queue
|
| 5 |
from threading import Thread
|
| 6 |
from typing import Optional
|
|
@@ -11,8 +8,11 @@ import torch
|
|
| 11 |
from transformers import MusicgenForConditionalGeneration, MusicgenProcessor, set_seed
|
| 12 |
from transformers.generation.streamers import BaseStreamer
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
-
model = MusicgenForConditionalGeneration.from_pretrained("facebook/musicgen-small"
|
| 16 |
processor = MusicgenProcessor.from_pretrained("facebook/musicgen-small")
|
| 17 |
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
from queue import Queue
|
| 2 |
from threading import Thread
|
| 3 |
from typing import Optional
|
|
|
|
| 8 |
from transformers import MusicgenForConditionalGeneration, MusicgenProcessor, set_seed
|
| 9 |
from transformers.generation.streamers import BaseStreamer
|
| 10 |
|
| 11 |
+
import gradio as gr
|
| 12 |
+
import spaces
|
| 13 |
+
|
| 14 |
|
| 15 |
+
model = MusicgenForConditionalGeneration.from_pretrained("facebook/musicgen-small")
|
| 16 |
processor = MusicgenProcessor.from_pretrained("facebook/musicgen-small")
|
| 17 |
|
| 18 |
|