Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,7 +3,6 @@ from fastapi.staticfiles import StaticFiles
|
|
| 3 |
import hashlib
|
| 4 |
from enum import Enum
|
| 5 |
from fastapi import FastAPI, Header, Query, Depends, HTTPException
|
| 6 |
-
from PIL import Image
|
| 7 |
from pdf2image import convert_from_bytes
|
| 8 |
import io
|
| 9 |
import fitz # PyMuPDF for PDF handling
|
|
@@ -240,8 +239,8 @@ def extract_text_from_file(
|
|
| 240 |
"file_key": file_key,
|
| 241 |
"file_type": content_type,
|
| 242 |
"document_type": document_type,
|
| 243 |
-
"base64DataResp": base64DataResp,
|
| 244 |
"entityrefkey": entity_ref_key,
|
|
|
|
| 245 |
"extracted_data": extracted_data
|
| 246 |
}
|
| 247 |
inserted_doc = invoice_collection.insert_one(document)
|
|
|
|
| 3 |
import hashlib
|
| 4 |
from enum import Enum
|
| 5 |
from fastapi import FastAPI, Header, Query, Depends, HTTPException
|
|
|
|
| 6 |
from pdf2image import convert_from_bytes
|
| 7 |
import io
|
| 8 |
import fitz # PyMuPDF for PDF handling
|
|
|
|
| 239 |
"file_key": file_key,
|
| 240 |
"file_type": content_type,
|
| 241 |
"document_type": document_type,
|
|
|
|
| 242 |
"entityrefkey": entity_ref_key,
|
| 243 |
+
"base64DataResp": base64DataResp,
|
| 244 |
"extracted_data": extracted_data
|
| 245 |
}
|
| 246 |
inserted_doc = invoice_collection.insert_one(document)
|