Spaces:
Runtime error
Runtime error
Deutsch is now available, language can be switched, use different embedding models, ingest resources from two languages, also propmts, vector retrival supported for both languages now.
db81bb8 Download app/utils/pdf2vector.py from tongyi21/LLM_Powered_Legal_RAG: direct link, hf CLI and curl.
- Browser
- Download file 375 Bytes
-
https://huggingface.co/spaces/tongyi21/LLM_Powered_Legal_RAG/resolve/main/app/utils/pdf2vector.py
- Command line
-
hf download hf://spaces/tongyi21/LLM_Powered_Legal_RAG/app/utils/pdf2vector.py
-
curl -L -o pdf2vector.py https://huggingface.co/spaces/tongyi21/LLM_Powered_Legal_RAG/resolve/main/app/utils/pdf2vector.py
375 Bytes
| from app.managers import vector_manager as vm | |
| from app.ingest import ingest_fedlex_pdf | |
| import os | |
| if len(vm.load_vectorstore("English").docstore._dict.values()) == 0: | |
| ingest_fedlex_pdf("data/fedlex-data-admin-ch-en.pdf", "English") | |
| if len(vm.load_vectorstore("Deutsch").docstore._dict.values()) == 0: | |
| ingest_fedlex_pdf("data/fedlex-data-admin-ch-de.pdf", "Deutsch") |