Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -26,6 +26,7 @@ df = gr.Dataframe(
|
|
26 |
datatype=["str", "str", "str", "str"],
|
27 |
row_count=1,
|
28 |
col_count=(4, "fixed"),
|
|
|
29 |
)
|
30 |
|
31 |
examples = [['example_data/audio/20170701_213954-MYOMYS-LR_0_0.5.wav', 0.3],
|
@@ -90,16 +91,18 @@ def generate_results_image(audio_file, anns):
|
|
90 |
descr_txt = "Demo of BatDetect2 deep learning-based bat echolocation call detection. " \
|
91 |
"<br>This model is only trained on bat species from the UK. If the input " \
|
92 |
"file is longer than 2 seconds, only the first 2 seconds will be processed." \
|
93 |
-
"<br>
|
94 |
|
95 |
gr.Interface(
|
96 |
fn = make_prediction,
|
97 |
inputs = [gr.Audio(source="upload", type="filepath", optional=True),
|
98 |
gr.Dropdown([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9])],
|
99 |
-
outputs = [df, "
|
100 |
theme = "huggingface",
|
101 |
title = "BatDetect2 Demo",
|
102 |
description = descr_txt,
|
103 |
examples = examples,
|
104 |
allow_flagging = 'never',
|
105 |
).launch()
|
|
|
|
26 |
datatype=["str", "str", "str", "str"],
|
27 |
row_count=1,
|
28 |
col_count=(4, "fixed"),
|
29 |
+
label='Predictions'
|
30 |
)
|
31 |
|
32 |
examples = [['example_data/audio/20170701_213954-MYOMYS-LR_0_0.5.wav', 0.3],
|
91 |
descr_txt = "Demo of BatDetect2 deep learning-based bat echolocation call detection. " \
|
92 |
"<br>This model is only trained on bat species from the UK. If the input " \
|
93 |
"file is longer than 2 seconds, only the first 2 seconds will be processed." \
|
94 |
+
"<br>Check out the paper [here](https://www.biorxiv.org/content/10.1101/2022.12.14.520490v1)."
|
95 |
|
96 |
gr.Interface(
|
97 |
fn = make_prediction,
|
98 |
inputs = [gr.Audio(source="upload", type="filepath", optional=True),
|
99 |
gr.Dropdown([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9])],
|
100 |
+
outputs = [df, gr.Image(label="Visualisation")],
|
101 |
theme = "huggingface",
|
102 |
title = "BatDetect2 Demo",
|
103 |
description = descr_txt,
|
104 |
examples = examples,
|
105 |
allow_flagging = 'never',
|
106 |
).launch()
|
107 |
+
|
108 |
+
|