DAPPER (Document Analysis, Processing, and Pattern Extraction Repository)
Statistical Learning Final Project for Document Classification
 
Loading...
Searching...
No Matches
server.py File Reference

Namespaces

namespace  server
 

Functions

 server.extract_text (image)
 
 server.image_to_base64 (image, format="PNG")
 
 server.lifespan (FastAPI app)
 
 server.get_index ()
 
 server.health_check ()
 
 server.classify_document (UploadFile file=File(...))
 
 server.extract_invoice_data (UploadFile file=File(...))
 
 server.list_models ()
 
 server.list_classes ()
 

Variables

 server.root_dir = str(Path(__file__).parent.parent)
 
list server.CLASSES = ["correspondence", "forms", "invoice", "other", "personal", "promotional", "scientific"]
 
 server.device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
 
str server.model_name = "resnet50"
 
dict server.models
 
str server.extractor_dir = "models/invoice_extractor"
 
 server.model = None
 
 server.transformations
 
 server.app
 
 server.allow_origins
 
 server.allow_credentials
 
 server.allow_methods
 
 server.allow_headers
 
 server.name
 
 server.host
 
 server.port