Update app.py
Browse files
app.py
CHANGED
@@ -43,7 +43,9 @@ collection = client.get_or_create_collection(
|
|
43 |
)
|
44 |
|
45 |
# Load the embedding model
|
46 |
-
embedding_model = SentenceTransformer('sentence-transformers/paraphrase-MiniLM-L6-v2')
|
|
|
|
|
47 |
|
48 |
# Initialize the text splitter
|
49 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1200, chunk_overlap=300)
|
@@ -79,7 +81,9 @@ SIMILARITY_THRESHOLD = 0.75
|
|
79 |
client1 = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=API_KEY) # Replace with your OpenRouter API key
|
80 |
|
81 |
# ---------------------- Models ----------------------
|
82 |
-
semantic_model = SentenceTransformer("sentence-transformers/all-mpnet-base-v2")
|
|
|
|
|
83 |
|
84 |
# Load QA Data
|
85 |
with open("qa.json", "r", encoding="utf-8") as f:
|
|
|
43 |
)
|
44 |
|
45 |
# Load the embedding model
|
46 |
+
#embedding_model = SentenceTransformer('sentence-transformers/paraphrase-MiniLM-L6-v2')
|
47 |
+
embedding_model = SentenceTransformer('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2')
|
48 |
+
|
49 |
|
50 |
# Initialize the text splitter
|
51 |
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1200, chunk_overlap=300)
|
|
|
81 |
client1 = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=API_KEY) # Replace with your OpenRouter API key
|
82 |
|
83 |
# ---------------------- Models ----------------------
|
84 |
+
#semantic_model = SentenceTransformer("sentence-transformers/all-mpnet-base-v2")
|
85 |
+
|
86 |
+
semantic_model = SentenceTransformer("sentence-transformers//paraphrase-multilingual-mpnet-base-v2")
|
87 |
|
88 |
# Load QA Data
|
89 |
with open("qa.json", "r", encoding="utf-8") as f:
|