Update app.py
Browse files
app.py
CHANGED
@@ -64,8 +64,11 @@ def process_pdfs(pdf_files):
|
|
64 |
|
65 |
# Upsert embeddings into Pinecone
|
66 |
index.upsert(vectors)
|
|
|
|
|
|
|
67 |
|
68 |
-
return f"Processed {len(pdf_files)} PDF(s) successfully and embeddings stored in Pinecone."
|
69 |
|
70 |
# Gradio Interface
|
71 |
demo = gr.Interface(
|
|
|
64 |
|
65 |
# Upsert embeddings into Pinecone
|
66 |
index.upsert(vectors)
|
67 |
+
|
68 |
+
# Fetch index stats
|
69 |
+
stats = index.describe_index_stats()
|
70 |
|
71 |
+
return f"Processed {len(pdf_files)} PDF(s) successfully and embeddings stored in Pinecone. Current Index Stats: {stats}"
|
72 |
|
73 |
# Gradio Interface
|
74 |
demo = gr.Interface(
|