Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run extract_graph.ipynb #5

Closed
briancunning opened this issue Nov 12, 2023 · 4 comments
Closed

Cannot run extract_graph.ipynb #5

briancunning opened this issue Nov 12, 2023 · 4 comments

Comments

@briancunning
Copy link

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?

@briancunning
Copy link
Author

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.

@briancunning
Copy link
Author

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')

@briancunning
Copy link
Author

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')

@RafikYH
Copy link

RafikYH commented Jun 18, 2024

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants