AI-Powered Web Application
This project is an AI-powered web application that provides four main functionalities:
- Document & Image Analysis: Upload documents or images for AI-powered summarization and interpretation.
- Intelligent Question Answering: Ask questions about your documents and images to get AI-powered answers.
- Data Visualization: Generate visualizations from Excel data using natural language requests.
- Document Translation: Translate your documents to different languages using AI.
Project Structure
The project consists of two main parts:
- Frontend: A vanilla JavaScript, HTML, and CSS application with a user-friendly interface for interacting with the AI functionalities.
- 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
# 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
# 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:
- Create a new Space on Hugging Face Spaces.
- Select Docker as the SDK.
- Upload the project files to the Space.
- 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:
- Backend Architecture and API Design: Detailed description of the FastAPI backend structure, API endpoint specifications, request/response handling, and API documentation.
- Prompt Engineering and Optimization: Detailed description of the prompt engineering process, including design, testing, and refinement of prompts for optimal performance.
- Frontend Design and User Experience: Analysis of the frontend design choices, UI/UX considerations, user workflows, and implementation of interactive elements.
- 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.