Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/kahst/BirdNET-Analyzer into…
Browse files Browse the repository at this point in the history
… main
  • Loading branch information
kahst committed Jan 8, 2024
2 parents b1f4642 + 775e2a6 commit ffb5ac6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,8 @@ def on_custom_classifier_selection_click():

def build_single_analysis_tab():
with gr.Tab("Single file"):
audio_input = gr.Audio(type="filepath", label="file")
audio_input = gr.Audio(type="filepath", label="file", sources=["upload"])
audio_path_state = gr.State()

confidence_slider, sensitivity_slider, overlap_slider = sample_sliders(False)
(
Expand All @@ -788,8 +789,13 @@ def build_single_analysis_tab():
) = species_lists(False)
locale_radio = locale()

def get_audio_path(i):
return i["path"] if i else None

audio_input.change(get_audio_path, inputs=audio_input, outputs=audio_path_state, preprocess=False)

inputs = [
audio_input,
audio_path_state,
confidence_slider,
sensitivity_slider,
overlap_slider,
Expand Down

0 comments on commit ffb5ac6

Please sign in to comment.