ppl_detector / app.py
calmdowngirl
display title
8ce1df4
raw
history blame
544 Bytes
import gradio as gr
from ppl_detector import detect, set_result
with gr.Blocks() as demo:
img_input = gr.Image(type="filepath", format="jpg", label="Input Image")
title = "<h1 id='result' style='display: flex;justify-content: center;'>it counts ppl, upload an image, see how it goes</h1>"
state = gr.HTML(title)
img_output = gr.Image(label="Output Image with Detections")
img_input.change(fn=detect, inputs=img_input, outputs=img_output)
img_output.change(fn=set_result, outputs=state)
demo.launch()