Spaces:
Runtime error
Runtime error
bug fix
Browse files
app.py
CHANGED
@@ -1,10 +1,11 @@
|
|
1 |
-
import
|
2 |
import gradio as gr
|
3 |
|
4 |
def run(input_image):
|
5 |
output = subprocess.check_output(["chmod", "a+x", "bin/detect-image"])
|
6 |
-
|
7 |
-
|
|
|
8 |
|
9 |
gr.Interface(
|
10 |
fn=run,
|
|
|
1 |
+
from subprocess import Popen, PIPE, STDOUT
|
2 |
import gradio as gr
|
3 |
|
4 |
def run(input_image):
|
5 |
output = subprocess.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()
|
9 |
|
10 |
gr.Interface(
|
11 |
fn=run,
|