Spaces:
Running
Running
marcellopoliti
commited on
Commit
•
fdbd104
1
Parent(s):
d258ef6
refactor: delete dead imports
Browse files- generate_kb.py +0 -7
- retrieve_kb.py +0 -2
- services/document_manager/document_loader.py +0 -3
- utils.py +0 -1
generate_kb.py
CHANGED
@@ -1,16 +1,9 @@
|
|
1 |
-
from fastapi import APIRouter
|
2 |
from services.document_manager.document_loader import DocumentsLoader
|
3 |
|
4 |
# from services.vectordb_manager.vectordb_manager import VectordbManager
|
5 |
import pandas as pd
|
6 |
-
import chromadb
|
7 |
-
from chromadb.config import Settings
|
8 |
-
import chromadb.utils.embedding_functions as embedding_functions
|
9 |
from dotenv import load_dotenv
|
10 |
import os
|
11 |
-
import requests
|
12 |
-
from bs4 import BeautifulSoup
|
13 |
-
from fastapi import FastAPI, File, UploadFile
|
14 |
import re
|
15 |
from app import client, default_embedding_function
|
16 |
import secrets
|
|
|
|
|
1 |
from services.document_manager.document_loader import DocumentsLoader
|
2 |
|
3 |
# from services.vectordb_manager.vectordb_manager import VectordbManager
|
4 |
import pandas as pd
|
|
|
|
|
|
|
5 |
from dotenv import load_dotenv
|
6 |
import os
|
|
|
|
|
|
|
7 |
import re
|
8 |
from app import client, default_embedding_function
|
9 |
import secrets
|
retrieve_kb.py
CHANGED
@@ -1,6 +1,4 @@
|
|
1 |
from fastapi import APIRouter
|
2 |
-
import chromadb
|
3 |
-
from chromadb.config import Settings
|
4 |
from utils import get_chroma_client, get_embedding_function
|
5 |
|
6 |
|
|
|
1 |
from fastapi import APIRouter
|
|
|
|
|
2 |
from utils import get_chroma_client, get_embedding_function
|
3 |
|
4 |
|
services/document_manager/document_loader.py
CHANGED
@@ -1,11 +1,8 @@
|
|
1 |
-
import re
|
2 |
from langchain.document_loaders import PyPDFLoader
|
3 |
import pandas as pd
|
4 |
from langchain.document_loaders import WebBaseLoader
|
5 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
6 |
import requests
|
7 |
-
from langchain_community.document_loaders import NotionDirectoryLoader
|
8 |
-
from langchain_googledrive.document_loaders import GoogleDriveLoader
|
9 |
|
10 |
|
11 |
class DocumentsLoader:
|
|
|
|
|
1 |
from langchain.document_loaders import PyPDFLoader
|
2 |
import pandas as pd
|
3 |
from langchain.document_loaders import WebBaseLoader
|
4 |
from langchain.text_splitter import RecursiveCharacterTextSplitter
|
5 |
import requests
|
|
|
|
|
6 |
|
7 |
|
8 |
class DocumentsLoader:
|
utils.py
CHANGED
@@ -2,7 +2,6 @@ import chromadb
|
|
2 |
from chromadb.config import Settings
|
3 |
import chromadb.utils.embedding_functions as embedding_functions
|
4 |
from dotenv import load_dotenv
|
5 |
-
import os
|
6 |
import streamlit as st
|
7 |
|
8 |
load_dotenv()
|
|
|
2 |
from chromadb.config import Settings
|
3 |
import chromadb.utils.embedding_functions as embedding_functions
|
4 |
from dotenv import load_dotenv
|
|
|
5 |
import streamlit as st
|
6 |
|
7 |
load_dotenv()
|