Instructions to use skroed/musicgen-medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use skroed/musicgen-medium with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-audio", model="skroed/musicgen-medium")# Load model directly from transformers import AutoProcessor, AutoModelForTextToWaveform processor = AutoProcessor.from_pretrained("skroed/musicgen-medium") model = AutoModelForTextToWaveform.from_pretrained("skroed/musicgen-medium", device_map="auto") - Notebooks
- Google Colab
- Kaggle
skroed commited on
Commit ·
97b02f0
1
Parent(s): 14d732b
fix: just return dict
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -42,4 +42,4 @@ class EndpointHandler:
|
|
| 42 |
# postprocess the prediction
|
| 43 |
prediction = outputs[0].cpu().numpy().tolist()
|
| 44 |
|
| 45 |
-
return
|
|
|
|
| 42 |
# postprocess the prediction
|
| 43 |
prediction = outputs[0].cpu().numpy().tolist()
|
| 44 |
|
| 45 |
+
return {"generated_audio": prediction}
|