Spaces:
Runtime error
Runtime error
Commit
·
c517a0d
1
Parent(s):
7084f70
Update app.py
Browse files
app.py
CHANGED
|
@@ -147,12 +147,12 @@ def main():
|
|
| 147 |
|
| 148 |
if image is not None:
|
| 149 |
q = [preprocess_image(image)]
|
| 150 |
-
results = batch_search_index(q, model, faiss_index, df,
|
| 151 |
image_src = "data:image/jpeg;base64," + image_path_to_base64(image)
|
| 152 |
html_output += f'Query: <img src="{image_src}" width="200" height="200"><br>'
|
| 153 |
else:
|
| 154 |
q = [text]
|
| 155 |
-
results = batch_search_index(q, model, faiss_index, df,
|
| 156 |
html_output += f'Query: {text}<br>'
|
| 157 |
|
| 158 |
html_output += f'Result Size: {len(results)}<br>'
|
|
|
|
| 147 |
|
| 148 |
if image is not None:
|
| 149 |
q = [preprocess_image(image)]
|
| 150 |
+
results = batch_search_index(q, model, faiss_index, df, 25, None, debug=False)[0]
|
| 151 |
image_src = "data:image/jpeg;base64," + image_path_to_base64(image)
|
| 152 |
html_output += f'Query: <img src="{image_src}" width="200" height="200"><br>'
|
| 153 |
else:
|
| 154 |
q = [text]
|
| 155 |
+
results = batch_search_index(q, model, faiss_index, df, 25, None, debug=False)[0]
|
| 156 |
html_output += f'Query: {text}<br>'
|
| 157 |
|
| 158 |
html_output += f'Result Size: {len(results)}<br>'
|