Spaces:
Sleeping
Sleeping
File size: 544 Bytes
279a2eb 8ce1df4 279a2eb 8ce1df4 279a2eb 8ce1df4 279a2eb |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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()
|