bishmoy commited on
Commit
1a45e4f
·
verified ·
1 Parent(s): 70d3727

minor tweaks

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -46,7 +46,7 @@ try:
46
 
47
  snapshot_download(
48
  repo_id=RAG_SOURCE,
49
- repo_type="dataset", # Your index is stored as a dataset repo
50
  token=hf_token,
51
  local_dir=LOCAL_DATA_DIR
52
  )
@@ -57,7 +57,7 @@ try:
57
  # Load the RAG model from the (now existing) local index path.
58
  gr.Info(f'''Loading index from {os.path.join(LOCAL_DATA_DIR, "arxiv_colbert")}...''')
59
  RAG = RAGPretrainedModel.from_index(os.path.join(LOCAL_DATA_DIR, "arxiv_colbert"))
60
- RAG.search("Test query", k=1) # Warm-up query
61
  gr.Info("Retriever loaded successfully!")
62
 
63
  except Exception as e:
 
46
 
47
  snapshot_download(
48
  repo_id=RAG_SOURCE,
49
+ repo_type="dataset",
50
  token=hf_token,
51
  local_dir=LOCAL_DATA_DIR
52
  )
 
57
  # Load the RAG model from the (now existing) local index path.
58
  gr.Info(f'''Loading index from {os.path.join(LOCAL_DATA_DIR, "arxiv_colbert")}...''')
59
  RAG = RAGPretrainedModel.from_index(os.path.join(LOCAL_DATA_DIR, "arxiv_colbert"))
60
+ _ = RAG.search("Test query", k=1) # Warm-up query
61
  gr.Info("Retriever loaded successfully!")
62
 
63
  except Exception as e: