thenativefox commited on
Commit
3f0e240
·
1 Parent(s): c6d6ded
Files changed (1) hide show
  1. backend/semantic_search.py +4 -1
backend/semantic_search.py CHANGED
@@ -2,8 +2,11 @@ import lancedb
2
  import os
3
  import gradio as gr
4
  from sentence_transformers import SentenceTransformer
 
5
 
6
- db = lancedb.connect("/Users/anvereshko/Desktop/rag-gradio-sample-project/gradio_app/.lancedb")
 
 
7
 
8
  MODEL1_STRATEGY1 = "model1_fixed"
9
  MODEL2_STRATEGY1 = "model2_fixed"
 
2
  import os
3
  import gradio as gr
4
  from sentence_transformers import SentenceTransformer
5
+ from pathlib import Path
6
 
7
+ # Connect to the LanceDB database
8
+ db_path = Path(__file__).resolve().parent.parent / ".lancedb"
9
+ db = lancedb.connect(db_path)
10
 
11
  MODEL1_STRATEGY1 = "model1_fixed"
12
  MODEL2_STRATEGY1 = "model2_fixed"