Text-to-Audio
Transformers
musicgen
Inference Endpoints
mmomeni commited on
Commit
1b7c652
·
verified ·
1 Parent(s): 93bba1b

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -1
handler.py CHANGED
@@ -5,7 +5,8 @@ from audiocraft.models import AudioGen
5
  class EndpointHandler:
6
  def __init__(self):
7
  # Load the AudioGen model
8
- self.model = AudioGen.get_pretrained('facebook/audiogen-medium')
 
9
  self.model.set_generation_params(duration=5) # Set default duration to 5 seconds
10
 
11
  def __call__(self, data: Dict[str, Any]) -> Dict[str, Any]:
 
5
  class EndpointHandler:
6
  def __init__(self):
7
  # Load the AudioGen model
8
+ # self.model = AudioGen.get_pretrained('facebook/audiogen-medium')
9
+ self.model = AudioGen.get_pretrained("./")
10
  self.model.set_generation_params(duration=5) # Set default duration to 5 seconds
11
 
12
  def __call__(self, data: Dict[str, Any]) -> Dict[str, Any]: