# AI-Powered Web Application This project is an AI-powered web application that provides four main functionalities: 1. **Document & Image Analysis**: Upload documents or images for AI-powered summarization and interpretation. 2. **Intelligent Question Answering**: Ask questions about your documents and images to get AI-powered answers. 3. **Data Visualization**: Generate visualizations from Excel data using natural language requests. 4. **Document Translation**: Translate your documents to different languages using AI. ## Project Structure The project consists of two main parts: 1. **Frontend**: A vanilla JavaScript, HTML, and CSS application with a user-friendly interface for interacting with the AI functionalities. 2. **Backend**: A Python FastAPI application that serves as a RESTful API for the AI services. ## Technologies Used ### Frontend - HTML5 - CSS3 - Vanilla JavaScript ### Backend - Python - FastAPI - Hugging Face Transformers - Document parsing libraries (Tika, PyPDF2, python-docx, pandas) - Data visualization libraries (Matplotlib, Seaborn) ## Getting Started ### Prerequisites - Python 3.8 or higher - Docker (for deployment) ### Running the Application ```bash # Navigate to the backend directory cd backend # Create a virtual environment (optional but recommended) python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install -r requirements.txt # Start the FastAPI server uvicorn main:app --reload ``` ### Running with Docker ```bash # Build the Docker image docker build -t ai-web-app . # Run the container docker run -p 8000:8000 ai-web-app ``` ## Deployment on Hugging Face Spaces This application can be deployed on Hugging Face Spaces using the Docker SDK. Follow these steps: 1. Create a new Space on Hugging Face Spaces. 2. Select Docker as the SDK. 3. Upload the project files to the Space. 4. The Space will automatically build and deploy the application. ## API Documentation The API documentation is available at `/docs` when the backend server is running. ## Project Report The project report should include the following sections: 1. **Backend Architecture and API Design**: Detailed description of the FastAPI backend structure, API endpoint specifications, request/response handling, and API documentation. 2. **Prompt Engineering and Optimization**: Detailed description of the prompt engineering process, including design, testing, and refinement of prompts for optimal performance. 3. **Frontend Design and User Experience**: Analysis of the frontend design choices, UI/UX considerations, user workflows, and implementation of interactive elements. 4. **Deployment and Scalability**: Discussion of Dockerization strategy, deployment process on Hugging Face Spaces, and considerations for web application scalability and performance. ## License This project is licensed under the MIT License - see the LICENSE file for details.