Penality commited on
Commit
5cffc5b
·
verified ·
1 Parent(s): 3d3f78a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
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
- print(f)
 
 
 
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())