Skip to content

Commit 24dc792

Browse files
moved the db commit to improve embedding speed. (#736)
also hide the thread input as its not used with hoplite
1 parent 069b9ef commit 24dc792

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

birdnet_analyzer/embeddings/utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ def analyze_file(item, db: sqlite_usearch_impl.SQLiteUsearchDB):
5050

5151
# Insert into database
5252
db.insert_embedding(embeddings, embeddings_source)
53-
db.commit()
54-
53+
db.commit()
5554
except Exception as ex:
5655
# Write error log
5756
print(f"Error: Cannot analyze audio file {fpath}.", flush=True)

birdnet_analyzer/gui/embeddings.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,15 @@ def select_directory_to_state_and_tb(state_key):
212212
minimum=1,
213213
interactive=True,
214214
)
215+
215216
threads_number = gr.Number(
216217
precision=1,
217218
label=loc.localize("embedding-settings-threads-number-label"),
218219
value=4,
219220
info=loc.localize("embedding-settings-threads-number-info"),
220221
minimum=1,
221222
interactive=True,
223+
visible=False, # Threads are currently not used as its not compatible with
222224
)
223225

224226
with gr.Row():

0 commit comments

Comments
 (0)