Comments (5)
Can you confirm your PDF is parsable (i.e., the text can be copied)? KnowlegeGPT doesn't currently support scanned documents.
from knowledge_gpt.
Thanks, and yes they are parsable. I tried on a few of them and got the error…
from knowledge_gpt.
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.
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.
Closing this for now. If anything pops up, let me know.
from knowledge_gpt.
Related Issues (20)
- This model's maximum context length is 4097 tokens, however you requested 7203 tokens (6947 in your prompt; 256 for the completion). Please reduce your prompt; or completion length. HOT 3
- Windows: ModuleNotFoundError: No module named 'openai' HOT 1
- Deprecated functions HOT 5
- Over resource limits on Streamlit Cloud HOT 1
- Can you automatically generate questions from a document and provide answers? like FAQ HOT 1
- Use code and functions in script (without streamlit GUI)
- Over resource limits on Streamlit Cloud HOT 1
- Error Running App HOT 1
- Over resource limits on Streamlit Cloud HOT 1
- Over resource limits on Streamlit Cloud HOT 1
- Over resource limits on Streamlit Cloud HOT 1
- Possible to upload multiple files? HOT 1
- ImportError: cannot import name 'faq' from partially initialized module HOT 1
- Modifying qa.py to allow for the model kwarg HOT 3
- Knowledge gpt not working HOT 1
- docker image
- Add ability to use other APIs? HOT 2
- [Feature] Ability to store vector index to pinecone or local storage HOT 1
- Modulenotfounderror HOT 8
- Azure OpenIA
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knowledge_gpt.