Spaces:
Runtime error
Runtime error
Add output to show processing
Browse files
app.py
CHANGED
|
@@ -65,6 +65,7 @@ def change_index(dataset):
|
|
| 65 |
INDEX, TEXT_LIST = load_faiss_index(dataset)
|
| 66 |
PREV_DATASET = dataset
|
| 67 |
gr.Info("Done!!")
|
|
|
|
| 68 |
|
| 69 |
@torch.inference_mode
|
| 70 |
def get_emb(text, device="cpu"):
|
|
@@ -154,6 +155,7 @@ with gr.Blocks() as demo:
|
|
| 154 |
btn.click(
|
| 155 |
fn=change_index,
|
| 156 |
inputs=[dataset],
|
|
|
|
| 157 |
).success(
|
| 158 |
fn=search_text,
|
| 159 |
inputs=[top_k, show_score, numbering_prefix, output_file, query_text],
|
|
|
|
| 65 |
INDEX, TEXT_LIST = load_faiss_index(dataset)
|
| 66 |
PREV_DATASET = dataset
|
| 67 |
gr.Info("Done!!")
|
| 68 |
+
return None
|
| 69 |
|
| 70 |
@torch.inference_mode
|
| 71 |
def get_emb(text, device="cpu"):
|
|
|
|
| 155 |
btn.click(
|
| 156 |
fn=change_index,
|
| 157 |
inputs=[dataset],
|
| 158 |
+
outputs=[result_text],
|
| 159 |
).success(
|
| 160 |
fn=search_text,
|
| 161 |
inputs=[top_k, show_score, numbering_prefix, output_file, query_text],
|