rahulnyk / knowledge_graph

Convert any text to a graph of knowledge. This can be used for Graph Augmented Generation or Knowledge Graph based QnA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot run extract_graph.ipynb

briancunning opened this issue · comments

It would be realy good if the colab has all the pip install commands.
I've tried running pip install -r 'requirements.txt'
pip install "unstructured[pdf]"
pip install langchain

Stuck trying to install helpers.df_helpers import documents2Dataframe?

I've tried
pip install helpers
pip install dataframe-helpers

None work?

ok, so the helper modules are part of the repo.

!git clone https://github.com/rahulnyk/knowledge_graph.git

I tried adding the repo folder to the system path but that didn't work

import sys
sys.path.append('/content/knowledge_graph')

So instead I specified the file path in the import command

pip install yachalk

import imp

prompts = imp.load_source('helpers.prompts', '/content/knowledge_graph/helpers/prompts.py')

import imp

df_helpers = imp.load_source('helpers.df_helpers', '/content/knowledge_graph/helpers/df_helpers.py')

That part now works. I'm relatively new to Python so I'm sure there is a better way to do this.

Started a new colab from scratch and the below worked. Don't know why it didn't the first time I tried.

!git clone https://github.com/rahulnyk/knowledge_graph.git

import sys
sys.path.append('/content/knowledge_graph')

Started a new colab from scratch and the below worked. Don't know why it didn't the first time I tried.

!git clone https://github.com/rahulnyk/knowledge_graph.git

import sys
sys.path.append('/content/knowledge_graph')

I'm glad you posted your issue and replied with your own solution, i'm also a beginner and i can only guess how much time this saved, which is ALOT :) thanks!