Spaces:
Runtime error
Runtime error
bug fix
Browse files
app.py
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
from subprocess import Popen, PIPE, STDOUT
|
2 |
import gradio as gr
|
3 |
|
4 |
def run(input_image):
|
5 |
-
output =
|
6 |
cmd = 'bin/detect-image'
|
7 |
p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
|
8 |
return p.stdout.read()
|
|
|
1 |
+
from subprocess import Popen, PIPE, STDOUT, check_output
|
2 |
import gradio as gr
|
3 |
|
4 |
def run(input_image):
|
5 |
+
output = check_output(["chmod", "a+x", "bin/detect-image"])
|
6 |
cmd = 'bin/detect-image'
|
7 |
p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True)
|
8 |
return p.stdout.read()
|