Skip to content

Commit

Permalink
Fix the demo, update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Vasilije1990 committed Sep 20, 2024
1 parent a609716 commit a1dc147
Show file tree
Hide file tree
Showing 2 changed files with 145 additions and 169 deletions.
4 changes: 2 additions & 2 deletions cognee/tasks/infer_data_ontology/infer_data_ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ async def add_graph_ontology(self, file_path: str = None, documents: list = None
chunk_strategy = chunk_config.chunk_strategy

for base_file in documents:
with open(base_file.file_path, "rb") as file:
with open(base_file.raw_data_location, "rb") as file:
try:
file_type = guess_file_type(file)
text = extract_text_from_file(file, file_type)
Expand Down Expand Up @@ -175,7 +175,7 @@ async def infer_data_ontology(documents, ontology_model = KnowledgeGraph, root_n
ontology_engine = OntologyEngine()
root_node_id = await ontology_engine.add_graph_ontology(documents = documents)
else:
graph_engine = get_graph_engine()
graph_engine = await get_graph_engine()
await add_model_class_to_graph(ontology_model, graph_engine)

yield (documents, root_node_id)
Loading

0 comments on commit a1dc147

Please sign in to comment.