Git Product home page Git Product logo

Comments (5)

mmz-001 avatar mmz-001 commented on August 15, 2024

Can you confirm your PDF is parsable (i.e., the text can be copied)? KnowlegeGPT doesn't currently support scanned documents.

from knowledge_gpt.

abdcef avatar abdcef commented on August 15, 2024

Thanks, and yes they are parsable. I tried on a few of them and got the error…

from knowledge_gpt.

mmz-001 avatar mmz-001 commented on August 15, 2024

Here's the stack trace from the server logs:

Stack Trace
Traceback (most recent call last):

  File "/home/appuser/venv/lib/python3.10/site-packages/streamlit/runtime/legacy_caching/caching.py", line 593, in get_or_create_cached_value

    return_value = _read_from_cache(

  File "/home/appuser/venv/lib/python3.10/site-packages/streamlit/runtime/legacy_caching/caching.py", line 350, in _read_from_cache

    raise e

  File "/home/appuser/venv/lib/python3.10/site-packages/streamlit/runtime/legacy_caching/caching.py", line 335, in _read_from_cache

    return _read_from_mem_cache(

  File "/home/appuser/venv/lib/python3.10/site-packages/streamlit/runtime/legacy_caching/caching.py", line 252, in _read_from_mem_cache

    raise CacheKeyNotFoundError("Key not found in mem cache")

streamlit.runtime.legacy_caching.caching.CacheKeyNotFoundError: Key not found in mem cache

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/home/appuser/venv/lib/python3.10/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script

    exec(code, module.__dict__)

  File "/app/knowledge_gpt/knowledge_gpt/main.py", line 79, in <module>

    index = embed_docs(text)

  File "/home/appuser/venv/lib/python3.10/site-packages/streamlit/runtime/legacy_caching/caching.py", line 627, in wrapped_func

    return get_or_create_cached_value()

  File "/home/appuser/venv/lib/python3.10/site-packages/streamlit/runtime/legacy_caching/caching.py", line 611, in get_or_create_cached_value

    return_value = non_optional_func(*args, **kwargs)

  File "/app/knowledge_gpt/knowledge_gpt/utils.py", line 97, in embed_docs

    index = FAISS.from_documents(docs, embeddings)

  File "/home/appuser/venv/lib/python3.10/site-packages/langchain/vectorstores/base.py", line 62, in from_documents

    return cls.from_texts(texts, embedding, metadatas=metadatas, **kwargs)

  File "/home/appuser/venv/lib/python3.10/site-packages/langchain/vectorstores/faiss.py", line 192, in from_texts

    index = faiss.IndexFlatL2(len(embeddings[0]))

IndexError: list index out of range

Can you link an example document so that I can repro this?

from knowledge_gpt.

abdcef avatar abdcef commented on August 15, 2024

It seems to work now 🤞
I uploaded a file and waited some minutes for the indexing to finish but it seems the file got dropped off. Will try again to see if the indexing completes.

from knowledge_gpt.

mmz-001 avatar mmz-001 commented on August 15, 2024

Closing this for now. If anything pops up, let me know.

from knowledge_gpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.