Spaces:
Runtime error
Runtime error
Commit
•
1785d30
1
Parent(s):
81b1cb9
Fixed timer
Browse files
app.py
CHANGED
@@ -1,9 +1,11 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
from detector import bat_detector
|
3 |
|
4 |
def find_bats(input_img):
|
|
|
5 |
after_image, total_bats = bat_detector(input_img)
|
6 |
-
return f"{total_bats}" + " bats found in " + f"{time:.2f}s", after_image
|
7 |
|
8 |
iface = gr.Interface(
|
9 |
fn=find_bats,
|
|
|
1 |
import gradio as gr
|
2 |
+
import time
|
3 |
from detector import bat_detector
|
4 |
|
5 |
def find_bats(input_img):
|
6 |
+
start = time.time()
|
7 |
after_image, total_bats = bat_detector(input_img)
|
8 |
+
return f"{total_bats}" + " bats found in " + f"{time.time()-start:.2f}s", after_image
|
9 |
|
10 |
iface = gr.Interface(
|
11 |
fn=find_bats,
|