Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -172,7 +172,7 @@ def extract_text_from_file(
|
|
| 172 |
"document": existing_document
|
| 173 |
}
|
| 174 |
# Fetch dynamic schema based on document type
|
| 175 |
-
schema_doc = db.
|
| 176 |
if not schema_doc:
|
| 177 |
raise ValueError("No schema found for the given document type")
|
| 178 |
|
|
|
|
| 172 |
"document": existing_document
|
| 173 |
}
|
| 174 |
# Fetch dynamic schema based on document type
|
| 175 |
+
schema_doc = db.invoice_collection.find_one({"document_type": document_type})
|
| 176 |
if not schema_doc:
|
| 177 |
raise ValueError("No schema found for the given document type")
|
| 178 |
|