# Server Configuration for Document Extraction Tool # Copy this file to config.py on your server and modify as needed # Server settings SERVER_HOST = "0.0.0.0" # Listen on all interfaces SERVER_PORT = 7860 # Default Gradio port SHARE_GRADIO = False # Set to True for public sharing (not recommended for production) # Application settings MAX_FILE_SIZE_MB = 50 # Maximum file size in MB ALLOWED_EXTENSIONS = [".pdf", ".docx", ".pptx", ".txt", ".xlsx", ".xls"] # Extraction settings USE_DOCLING = True # Try to use docling for enhanced PDF extraction EXTRACTION_TIMEOUT = 60 # Timeout for extraction in seconds # Logging settings LOG_LEVEL = "INFO" # DEBUG, INFO, WARNING, ERROR LOG_TO_FILE = True # Whether to log to file LOG_FILE_PATH = "app.log" # Performance settings ENABLE_QUEUE = True # Enable request queuing for high load MAX_CONCURRENT_REQUESTS = 3 # Maximum concurrent extractions # Security settings (for production) ENABLE_AUTH = False # Set to True to enable authentication AUTH_USERNAME = "admin" # Change this! AUTH_PASSWORD = "password" # Change this! # Example environment variable mapping: # export GRADIO_SERVER_NAME="0.0.0.0" # export GRADIO_SERVER_PORT="7860" # export MAX_FILE_SIZE="50" # export USE_DOCLING="true"