Synced repo using 'sync_with_huggingface' Github Action
Browse files- app.py +1 -1
- fact_checker.py +1 -1
app.py
CHANGED
@@ -34,7 +34,7 @@ def store_feedback_csv(claim, result, feedback, csv_file="feedback_log.csv"):
|
|
34 |
|
35 |
def initialize_services():
|
36 |
return FactChecker(
|
37 |
-
chroma_path="chroma_db",
|
38 |
collection_name="pib_titles",
|
39 |
groq_client=OpenAI(
|
40 |
api_key=os.getenv("GROQ_API_KEY"),
|
|
|
34 |
|
35 |
def initialize_services():
|
36 |
return FactChecker(
|
37 |
+
chroma_path="./chroma_db",
|
38 |
collection_name="pib_titles",
|
39 |
groq_client=OpenAI(
|
40 |
api_key=os.getenv("GROQ_API_KEY"),
|
fact_checker.py
CHANGED
@@ -47,7 +47,7 @@ def robust_json_extractor(response_content):
|
|
47 |
|
48 |
class FactChecker:
|
49 |
def __init__(self, chroma_path, collection_name, groq_client):
|
50 |
-
self.client = chromadb.
|
51 |
self.collection = self.client.get_collection(
|
52 |
name=collection_name,
|
53 |
embedding_function=embedding_functions.SentenceTransformerEmbeddingFunction(
|
|
|
47 |
|
48 |
class FactChecker:
|
49 |
def __init__(self, chroma_path, collection_name, groq_client):
|
50 |
+
self.client = chromadb.PersistentClient(path=chroma_path)
|
51 |
self.collection = self.client.get_collection(
|
52 |
name=collection_name,
|
53 |
embedding_function=embedding_functions.SentenceTransformerEmbeddingFunction(
|