File size: 345 Bytes
671307d
 
 
 
025f865
 
671307d
 
 
 
134eef3
671307d
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import subprocess
import gradio as gr

def run(input_image):
    output = subprocess.check_output(["chmod", "a+x", "bin/detect-image"])
    output = subprocess.check_output("bin/detect-image")
    return output.decode("utf-8")

gr.Interface(
    fn=run,
    inputs=gr.Image(type="pil", label="Input Image"),
    outputs=gr.Textbox(),
).launch()