rbanfield commited on
Commit
cad7e16
·
1 Parent(s): c0bca30
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -10,9 +10,11 @@ def run(input_image):
10
  output_image_filename = tmpdir + "/result.jpg"
11
  cmd = 'bin/detect-image ' + input_image + ' ' + output_image_filename
12
  p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
 
 
13
  i = Image.open(output_image_filename)
14
 
15
- return p.stdout.read(), i
16
 
17
  gr.Interface(
18
  fn=run,
 
10
  output_image_filename = tmpdir + "/result.jpg"
11
  cmd = 'bin/detect-image ' + input_image + ' ' + output_image_filename
12
  p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
13
+ j = p.stdout.read()
14
+ print(j)
15
  i = Image.open(output_image_filename)
16
 
17
+ return i, j
18
 
19
  gr.Interface(
20
  fn=run,