From b608c56f9fb88996054a0b72c093f4f50f394a6f Mon Sep 17 00:00:00 2001 From: jules Date: Fri, 18 Jan 2019 13:30:19 +0100 Subject: fix uprez --- uprez.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'uprez.py') diff --git a/uprez.py b/uprez.py index cc9b694..61d05cd 100644 --- a/uprez.py +++ b/uprez.py @@ -72,10 +72,10 @@ subprocess.call([ ]) if opt.folder_id > 0: - mp4 = os.path.join(out_dir, opt.out_fn + '.mp4') + mp4 = os.path.join('./uprez', opt.out_fn + '.mp4') print("upload {}".format(mp4)) endpoint = os.getenv('API_REMOTE') + '/api/folder/{}/upload/'.format(opt.folder_id) - subprocess.call([ + cmd = [ "curl", "-X", "POST", "-F", "module=pix2pixhd", @@ -84,12 +84,14 @@ if opt.folder_id > 0: "-F", "generated=1", "-F", "dataset={}".format(dataset), "-F", "datatype=video", - "-F", "file=\@{}".format(mp4), + "-F", "file=@{}".format(mp4), endpoint - ]) + ] + print(" ".join(cmd)) + subprocess.call(cmd) finish_time = time.time() -print("took %02f s.".format(finish_time - start_time)) +print("took {} s.".format(finish_time - start_time)) -- cgit v1.2.3-70-g09d2