Spaces:
Sleeping
Sleeping
viboognesh
commited on
Upload folder using huggingface_hub
Browse files
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
qdrant_mm_db_pipeline/collection/text_collection_pipeline/storage.sqlite filter=lfs diff=lfs merge=lfs -text
|
app.py
CHANGED
@@ -19,8 +19,12 @@ from llama_index.llms.openai import OpenAI
|
|
19 |
from llama_index.core import load_index_from_storage, get_response_synthesizer
|
20 |
import tempfile
|
21 |
|
22 |
-
from dotenv import load_dotenv
|
23 |
-
load_dotenv()
|
|
|
|
|
|
|
|
|
24 |
|
25 |
def extract_text_from_pdf(pdf_path):
|
26 |
reader = PdfReader(pdf_path)
|
@@ -103,8 +107,10 @@ def remove_duplicate_images(data_path) :
|
|
103 |
|
104 |
def initialize_qdrant(temp_dir):
|
105 |
|
106 |
-
client = qdrant_client.QdrantClient(path="qdrant_mm_db_pipeline")
|
107 |
-
|
|
|
|
|
108 |
|
109 |
if "vectordatabase" not in st.session_state or not st.session_state.vectordatabase:
|
110 |
text_store = QdrantVectorStore(client=client, collection_name="text_collection_pipeline")
|
|
|
19 |
from llama_index.core import load_index_from_storage, get_response_synthesizer
|
20 |
import tempfile
|
21 |
|
22 |
+
# from dotenv import load_dotenv
|
23 |
+
# load_dotenv()
|
24 |
+
|
25 |
+
OPENAI_API_KEY = "sk-proj-beorroDjV4FeoL6OAzbET3BlbkFJT4WcMiP0x30GxzmbpIEC"
|
26 |
+
os.environ["OPENAI_API_KEY"] = OPENAI_API_KEY
|
27 |
+
|
28 |
|
29 |
def extract_text_from_pdf(pdf_path):
|
30 |
reader = PdfReader(pdf_path)
|
|
|
107 |
|
108 |
def initialize_qdrant(temp_dir):
|
109 |
|
110 |
+
# client = qdrant_client.QdrantClient(path="qdrant_mm_db_pipeline")
|
111 |
+
# client = qdrant_client.QdrantClient(host = "192.168.0.1" , port = 2401 , https = True)
|
112 |
+
# client = qdrant_client.QdrantClient(url = "http://localhost:2452")
|
113 |
+
client = qdrant_client.QdrantClient(url="4b0af7be-d5b3-47ac-b215-128ebd6aa495.europe-west3-0.gcp.cloud.qdrant.io:6333", api_key="CO1sNGLmC6R_Q45qSIUxBSX8sxwHud4MCm4as_GTI-vzQqdUs-bXqw",)
|
114 |
|
115 |
if "vectordatabase" not in st.session_state or not st.session_state.vectordatabase:
|
116 |
text_store = QdrantVectorStore(client=client, collection_name="text_collection_pipeline")
|
qdrant_mm_db_pipeline/collection/image_collection_pipeline/storage.sqlite
ADDED
Binary file (307 kB). View file
|
|
qdrant_mm_db_pipeline/collection/text_collection_pipeline/storage.sqlite
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:abc3d5e877a46fab7aef3c35b28f465d363af0f37e6a7097a4f25b578d941ff7
|
3 |
+
size 3084288
|
qdrant_mm_db_pipeline/meta.json
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"collections": {}, "aliases": {}}
|
|
|
1 |
+
{"collections": {"text_collection_pipeline": {"vectors": {"size": 1536, "distance": "Cosine", "hnsw_config": null, "quantization_config": null, "on_disk": null, "datatype": null, "multivector_config": null}, "shard_number": null, "sharding_method": null, "replication_factor": null, "write_consistency_factor": null, "on_disk_payload": null, "hnsw_config": null, "wal_config": null, "optimizers_config": null, "init_from": null, "quantization_config": null, "sparse_vectors": null}, "image_collection_pipeline": {"vectors": {"size": 512, "distance": "Cosine", "hnsw_config": null, "quantization_config": null, "on_disk": null, "datatype": null, "multivector_config": null}, "shard_number": null, "sharding_method": null, "replication_factor": null, "write_consistency_factor": null, "on_disk_payload": null, "hnsw_config": null, "wal_config": null, "optimizers_config": null, "init_from": null, "quantization_config": null, "sparse_vectors": null}}, "aliases": {}}
|