Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -67,12 +67,16 @@ def store_document_data(PDF_FILE):
|
|
67 |
|
68 |
faiss_index = faiss.read_index(index_file)
|
69 |
print("FAISS index loaded successfully. Number of vectors:", faiss_index.ntotal)
|
70 |
-
|
|
|
71 |
doc_index = index.ntotal - 1
|
72 |
|
73 |
with open(index_file, "rb") as f:
|
74 |
f.seek(0)
|
75 |
-
|
|
|
|
|
|
|
76 |
response = requests.post(API_URL_EMBEDDINGS, files={"file": f})
|
77 |
|
78 |
print("sent", response.json())
|
|
|
67 |
|
68 |
faiss_index = faiss.read_index(index_file)
|
69 |
print("FAISS index loaded successfully. Number of vectors:", faiss_index.ntotal)
|
70 |
+
|
71 |
+
|
72 |
doc_index = index.ntotal - 1
|
73 |
|
74 |
with open(index_file, "rb") as f:
|
75 |
f.seek(0)
|
76 |
+
|
77 |
+
file_content = f.read(20) # Read first 20 bytes
|
78 |
+
print("First 20 bytes of the file:", file_content)
|
79 |
+
|
80 |
response = requests.post(API_URL_EMBEDDINGS, files={"file": f})
|
81 |
|
82 |
print("sent", response.json())
|