Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
@@ -397,6 +397,8 @@ def create_documents(data_source: str, data: List[dict]) -> List[Document]:
|
|
397 |
|
398 |
return docs
|
399 |
|
|
|
|
|
400 |
# 4. Vector Store Integration
|
401 |
|
402 |
import faiss
|
@@ -417,7 +419,7 @@ class MyVector_Store:
|
|
417 |
# -----------------------------
|
418 |
# Process JSON data and create documents
|
419 |
# -----------------------------
|
420 |
-
with open("
|
421 |
json_data = json.load(f)
|
422 |
|
423 |
docs = create_documents("json", json_data)
|
|
|
397 |
|
398 |
return docs
|
399 |
|
400 |
+
|
401 |
+
|
402 |
# 4. Vector Store Integration
|
403 |
|
404 |
import faiss
|
|
|
419 |
# -----------------------------
|
420 |
# Process JSON data and create documents
|
421 |
# -----------------------------
|
422 |
+
with open("/home/wendy/my_hf_agent_course_projects/data.json", "r", encoding="utf-8") as f:
|
423 |
json_data = json.load(f)
|
424 |
|
425 |
docs = create_documents("json", json_data)
|