-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsub.py
More file actions
26 lines (20 loc) · 960 Bytes
/
sub.py
File metadata and controls
26 lines (20 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import subprocess, time, os, sys
input_dir = '/workspace/images/'
out = ""
# p = subprocess.Popen([sys.executable,
# "python", "/workspace/rude-carnie/guess.py",
# "--model_type", "inception",
# "--model_dir", "/workspace/22801",
# "--filename", "/workspace/images/1000_16_M_60+_0.0543072_1.86479.jpg"],
# stdout=subprocess.PIPE,
# stderr=subprocess.STDOUT)
p = subprocess.Popen([sys.executable,
"/workspace/rude-carnie/guess.py",
"--model_type", "inception",
"--model_dir", "/workspace/22801",
"--filename", "/workspace/images/1000_16_M_60+_0.0543072_1.86479.jpg"],
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT)
with open("out.log", "w") as f:
f.write(p.stdout.read())
# print(p.stdout.read())