Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -130,7 +130,7 @@ def process_audio(audio_file):
|
|
130 |
if audio_embedding.size == 0:
|
131 |
return "Error generating embedding for the audio text", None
|
132 |
|
133 |
-
distances, indices = index.search(np.array([audio_embedding]), k=
|
134 |
relevant_texts = [texts[idx] for idx in indices[0]]
|
135 |
combined_text = " ".join(relevant_texts)
|
136 |
if len(combined_text) > 1000:
|
|
|
130 |
if audio_embedding.size == 0:
|
131 |
return "Error generating embedding for the audio text", None
|
132 |
|
133 |
+
distances, indices = index.search(np.array([audio_embedding]), k=5)
|
134 |
relevant_texts = [texts[idx] for idx in indices[0]]
|
135 |
combined_text = " ".join(relevant_texts)
|
136 |
if len(combined_text) > 1000:
|