Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ embedding_dim = 768 # Adjust according to model
|
|
32 |
def store_document_data(PDF_FILE, METADATA_FILE, INDEX_FILE):
|
33 |
print(" Storing document...")
|
34 |
|
35 |
-
|
36 |
# Extract text from the PDF
|
37 |
text = extract_text_from_pdf(PDF_FILE)
|
38 |
if not text:
|
|
|
32 |
def store_document_data(PDF_FILE, METADATA_FILE, INDEX_FILE):
|
33 |
print(" Storing document...")
|
34 |
|
35 |
+
if PDF_FILE:
|
36 |
# Extract text from the PDF
|
37 |
text = extract_text_from_pdf(PDF_FILE)
|
38 |
if not text:
|