Instructions to use jamesdon/audiogen-medium-endpoint with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jamesdon/audiogen-medium-endpoint with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-audio", model="jamesdon/audiogen-medium-endpoint")# Load model directly from transformers import AutoProcessor, AutoModelForTextToWaveform processor = AutoProcessor.from_pretrained("jamesdon/audiogen-medium-endpoint") model = AutoModelForTextToWaveform.from_pretrained("jamesdon/audiogen-medium-endpoint", device_map="auto") - Notebooks
- Google Colab
- Kaggle
fix
Browse files- handler.py +1 -1
handler.py
CHANGED
|
@@ -5,7 +5,7 @@ import torch
|
|
| 5 |
class EndpointHandler:
|
| 6 |
def __init__(self, path=""):
|
| 7 |
# load model and processor from path
|
| 8 |
-
path = "
|
| 9 |
self.processor = AutoProcessor.from_pretrained(path)
|
| 10 |
self.model = MusicgenForConditionalGeneration.from_pretrained(path).to("cuda")
|
| 11 |
|
|
|
|
| 5 |
class EndpointHandler:
|
| 6 |
def __init__(self, path=""):
|
| 7 |
# load model and processor from path
|
| 8 |
+
path = "jamesdon/audiogen-medium-endpoint"
|
| 9 |
self.processor = AutoProcessor.from_pretrained(path)
|
| 10 |
self.model = MusicgenForConditionalGeneration.from_pretrained(path).to("cuda")
|
| 11 |
|