diff options
| author | jules <jules@asdf.us> | 2019-01-18 13:30:19 +0100 |
|---|---|---|
| committer | jules <jules@asdf.us> | 2019-01-18 13:30:19 +0100 |
| commit | b608c56f9fb88996054a0b72c093f4f50f394a6f (patch) | |
| tree | 53bcf47fb5705930002827b8b412aed255c92791 | |
| parent | d682a19167b92d48998822d93a8619c55fc4335f (diff) | |
| -rw-r--r-- | uprez.py | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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)) |
