File size: 3,047 Bytes
ad43e8a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# 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.