File size: 825 Bytes
5593e7e 83b1cb8 081fde1 83b1cb8 081fde1 83b1cb8 081fde1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import base64
from handler import EndpointHandler
if __name__ == '__main__':
# init handler
my_handler = EndpointHandler(path=".")
# TEXT -----------------------------------------------------------------------------------------
text_payload = {"inputs": "I am quite excited how this will turn out"}
text_pred = my_handler(text_payload)
print("text_pred", text_pred)
#
# # AUDIO ----------------------------------------------------------------------------------------
# audio_payload = {"audio": base64.b64encode(
# open(
# "/home/arthur/data/musicdb/split_demucses/474499231_456751864 --__-- Breakbot - Programme_mp3_drums/chunk_11.wav",
# 'rb').read())}
# audio_pred = my_handler(audio_payload)
# print("audio_pred", audio_pred) # show results
|