Spaces:
Running
Running
fix: UnboundLocalError: local variable 'audio_index' referenced before assignment
Browse files
data_search/data_search_page.py
CHANGED
|
@@ -64,6 +64,9 @@ def data_search(clip_model, preprocess, text_embedding_model, whisper_model, dev
|
|
| 64 |
image_input = st.file_uploader("Upload Image", type=["png", "jpg", "jpeg"])
|
| 65 |
|
| 66 |
if st.button("Search", disabled=text_input.strip() == "" and image_input is None):
|
|
|
|
|
|
|
|
|
|
| 67 |
if os.path.exists("./vectorstore/image_index.index"):
|
| 68 |
image_index, image_data = load_image_index()
|
| 69 |
if os.path.exists("./vectorstore/text_index.index"):
|
|
|
|
| 64 |
image_input = st.file_uploader("Upload Image", type=["png", "jpg", "jpeg"])
|
| 65 |
|
| 66 |
if st.button("Search", disabled=text_input.strip() == "" and image_input is None):
|
| 67 |
+
image_index, image_data = None, None
|
| 68 |
+
text_index, text_data = None, None
|
| 69 |
+
audio_index, audio_data = None, None
|
| 70 |
if os.path.exists("./vectorstore/image_index.index"):
|
| 71 |
image_index, image_data = load_image_index()
|
| 72 |
if os.path.exists("./vectorstore/text_index.index"):
|