Spaces:
Runtime error
Runtime error
import gradio as gr | |
import time | |
from detector import bat_detector | |
def find_bats(input_img): | |
start = time.time() | |
after_image, total_bats = bat_detector(input_img) | |
return f"{total_bats}" + " bats found in " + f"{time.time()-start:.2f}s", after_image | |
iface = gr.Interface( | |
fn=find_bats, | |
inputs=gr.Image(shape=(640, 512)), | |
outputs=['text', gr.Image(shape=(960, 768))] | |
) | |
iface.launch() |