Vivek0912's picture
deploying code to hugging face
fe6855c
|
Raw
History Blame Contribute Delete
2.3 kB

πŸ“§ Gen AI Email Processing

This project is an AI-powered email processing system that reads, extracts, classifies, and analyzes emails and documents using LLaMA models. It supports OCR for images/PDFs and utilizes machine learning to classify emails.


πŸš€ Tech Stack

  • Python (Backend Development)
  • FastAPI (API Framework)
  • PyTorch & Transformers (AI Model - LLaMA)
  • OCR Tools (Tesseract, pdfplumber, python-docx)
  • Langchain & Sentence-Transformers (Text Processing & Embeddings)
  • Uvicorn (ASGI Server)
  • Scikit-learn & Pandas (Data Processing)
  • LLama-CPP-Python (LLaMA Model Integration)

πŸ“₯ Installation & Setup

Follow these steps to set up the project on your local machine:

1️⃣ Clone the Repository

 git clone https://github.com/your-username/gen_ai_email_processing.git
 cd gen_ai_email_processing

2️⃣ Create a Virtual Environment

 python -m venv env
 source env/bin/activate  # On macOS/Linux
 env\Scripts\activate    # On Windows

3️⃣ Install Dependencies

 pip install --upgrade pip
 pip install -r requirements.txt

4️⃣ Run the FastAPI Server

 uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload

5️⃣ Access the API Documentation


πŸ“¬ API Endpoints

Method Endpoint Description
POST /upload-email Upload and process email
GET /health Check API status

πŸ›  Environment Variables

Create a .env file in the config/ directory and add the necessary settings:

MODEL_PATH=/path/to/llama/model
OCR_LANGUAGE=eng

πŸ”„ Updating the Project

If you pull new changes from GitHub, remember to update dependencies:

 git pull origin main
 pip install -r requirements.txt

πŸ“€ Pushing the Project to GitHub

After making changes, push them to GitHub:

 git add .
 git commit -m "Updated project files"
 git push origin main

πŸ“ Contributing

Feel free to fork and contribute to this project! 😊