Automatic Speech Recognition
Transformers
4 languages
whisper
whisper-event
Generated from Trainer
Inference Endpoints
whisper-tiny-sv / run_sm.py
marinone94's picture
fix path
2786d7b
""" Python script that triggers sagemaker flow"""
import sys
import subprocess
def main():
# Let's skip arg names
script_name = sys.argv[2]
repo = sys.argv[4]
repo_name = repo.split('/')[-1] + '/'
cmd = f'git clone {repo}'
print("Running", cmd)
output1 = subprocess.run(cmd.split(), stdout=subprocess.PIPE)
print(output1.stdout.decode())
cmd = f'sh {repo_name}/{script_name} {repo_name}'
print("Running", cmd)
output2 = subprocess.run(cmd.split(), stdout=subprocess.PIPE)
print(output2.stdout.decode())
if __name__ == '__main__':
main()