musicgen-large / test.py
onurio's picture
working handler
e657366
raw
history blame
277 Bytes
from handler import EndpointHandler
# init handler
my_handler = EndpointHandler(path=".")
# prepare sample payload
payload = {"input": "Lowfi hiphop with deep bass"}
# test the handler
pred=my_handler(payload)
with open("generated_audio.wav", "wb") as f:
f.write(pred)