Eun0 commited on
Commit
bd2ecfe
1 Parent(s): d9c0937

Add output to show processing

Browse files
Files changed (1) hide show
  1. app.py +2 -0
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],