A comprehensive web application for analyzing company executive summaries using Large Language Models (LLMs).
- PDF Upload: Drag-and-drop or click to upload PDF documents
- AI-Powered Analysis: Extract key information using OpenAI GPT-4
- Structured Reports: Generate professional investment analysis reports
- Multiple Export Formats: Download reports as HTML or Markdown
- Confidence Scoring: Each extracted field includes confidence scores
- Robust PDF Processing: Handles various PDF formats and layouts
- Clone the repository:
git clone <repository-url>
cd executive-summary-analyzer- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .env.example .env
# Edit .env and add your OpenAI API key- Run the application:
python app.py- Open your browser and navigate to
http://localhost:5000
OPENAI_API_KEY: Your OpenAI API key (required)SECRET_KEY: Flask secret key for session managementFLASK_ENV: Set to 'development' or 'production'HOST: Server host (default: 127.0.0.1)PORT: Server port (default: 5000)
GET /: Main web interfacePOST /api/analyze: Upload and analyze PDF documentGET /api/report/<format>/<filename>: Download generated reportGET /health: Health check endpoint
executive-summary-analyzer/
├── app.py # Main application file
├── templates/
│ └── index.html # Web interface
├── uploads/ # Temporary file storage
├── reports/ # Generated reports
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
└── README.md # This file
- Open the web interface
- Upload a PDF executive summary
- Click "Analyze Document"
- View the extracted information and generated report
- Download the report in HTML or Markdown format
The application includes comprehensive error handling for:
- Invalid file types
- PDF extraction failures
- API errors
- Network issues
- File uploads are validated and sanitized
- Temporary files are cleaned up after processing
- API keys are stored securely in environment variables
- CORS is configured for API endpoints
This project is provided as-is for educational and commercial use.