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

error trying to regenerate #9

Open
gautambak opened this issue Nov 15, 2023 · 5 comments
Open

error trying to regenerate #9

gautambak opened this issue Nov 15, 2023 · 5 comments

Comments

@gautambak
Copy link

Hi Rahul,

Thank you for this wonderful project and I'm excited to play around with it.

If I said regenerate to false, then the code works but when I try to regenerate using my own PDF and data, I get the following error:
ERROR ### Here is the buggy response: None

An error occurred: HTTPConnectionPool(host='localhost', port=11434): Max retries exceeded with url: /api/generate (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7caf1e449180>: Failed to establish a new connection: [Errno 111] Connection refused'))

ERROR ### Here is the buggy response: None

An error occurred: HTTPConnectionPool(host='localhost', port=11434): Max retries exceeded with url: /api/generate (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7caf1e44a9e0>: Failed to establish a new connection: [Errno 111] Connection refused'))

ERROR ### Here is the buggy response: None


ValueError Traceback (most recent call last)
in <cell line: 4>()
3
4 if regenerate:
----> 5 concepts_list = df2Graph(df, model='zephyr:latest')
6 dfg1 = graph2Df(concepts_list)
7 if not os.path.exists(outputdirectory):

1 frames
/usr/local/lib/python3.10/dist-packages/numpy/core/overrides.py in concatenate(*args, **kwargs)

ValueError: need at least one array to concatenate

-- if it helps, I'm using Google Collab and pulled your repo into my instance

@rahulnyk
Copy link
Owner

Hey Gautam,
I think this is because of the missing Ollama server.

when you set regenerate to False, it just reads the existing CSV file. When you set it to False, it tries to re-extract concepts from the LLM. For that, it needs an Ollama server hosted locally and Zephyr model pulled locally.

Step 1: Install Ollama https://ollama.ai
Step 2: run ollama run zephyr in your terminal. This will pull the zephyr model to your local machine and start the Ollama server.

@gautambak
Copy link
Author

Hey Rahul,

Thank you for that, I'm still getting errors:
/content# ollama pull zephyr
Error: could not connect to ollama server, run 'ollama serve' to start it
/content# ollama serve
2023/11/26 03:54:06 images.go:779: total blobs: 0
2023/11/26 03:54:06 images.go:786: total unused blobs removed: 0
2023/11/26 03:54:06 routes.go:777: Listening on 127.0.0.1:11434 (version 0.1.11)

[GIN] 2023/11/26 - 03:54:20 | 404 | 507.407µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 70.048µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 85.69µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 72.12µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 79.2µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 70.018µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 88.667µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 75.345µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 66.661µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 73.33µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 68.976µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 75.881µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 93.462µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 61.866µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 71.39µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 69.099µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 79.912µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 63.016µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 70.322µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 67.904µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 57.398µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 83.668µs | 127.0.0.1 | POST "/api/generate"
[GIN] 2023/11/26 - 03:54:20 | 404 | 62.811µs | 127.0.0.1 | POST "/api/generate"

[0] 0:ollama*

@rahulnyk
Copy link
Owner

rahulnyk commented Nov 26, 2023

I am confused.
Do you have an Ollama server running before you run Ollama pull zephyr

In any case, this problem pertains to the Ollama server on your local. I am sure if it is running properly, the code will run. Please refer to Ollama documentation

@gautambak
Copy link
Author

ok i'll try again. I am not running this locally, I'm trying to run it on colab so that might be the problem.

@nestorDario
Copy link

Good morning.
I can run in Colab?
How do I use Ollama?

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

4 participants
@gautambak @rahulnyk @nestorDario and others