Spaces:
Sleeping
Sleeping
Rajan Sharma
commited on
Update session_rag.py
Browse files- session_rag.py +4 -1
session_rag.py
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
-
\
|
| 2 |
from typing import List, Tuple
|
| 3 |
from sentence_transformers import SentenceTransformer
|
| 4 |
import numpy as np
|
| 5 |
import faiss
|
| 6 |
|
| 7 |
class SessionRAG:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
def __init__(self, model_name="sentence-transformers/all-MiniLM-L6-v2"):
|
| 9 |
self.model = SentenceTransformer(model_name)
|
| 10 |
self.docs: List[Tuple[str, str]] = []
|
|
|
|
|
|
|
| 1 |
from typing import List, Tuple
|
| 2 |
from sentence_transformers import SentenceTransformer
|
| 3 |
import numpy as np
|
| 4 |
import faiss
|
| 5 |
|
| 6 |
class SessionRAG:
|
| 7 |
+
"""
|
| 8 |
+
In-memory, per-session store for uploaded content.
|
| 9 |
+
No disk persistence to remain PHI-safe by default.
|
| 10 |
+
"""
|
| 11 |
def __init__(self, model_name="sentence-transformers/all-MiniLM-L6-v2"):
|
| 12 |
self.model = SentenceTransformer(model_name)
|
| 13 |
self.docs: List[Tuple[str, str]] = []
|