Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Email Generator

Overview

AI Email Generator is a web application that generates professional emails based on user input using Amazon Bedrock and the Amazon Nova Lite foundation model. Users can specify the purpose of the email, recipient, tone, and key points, and the application generates a well-structured email in seconds.

The project was built to explore Generative AI application development using AWS services while learning prompt engineering, Amazon Bedrock, and Python.


Features

  • Generate professional emails using AI
  • Choose different email tones (Formal, Friendly, Professional)
  • Enter custom purpose, recipient, and key points
  • AI-powered email generation using Amazon Bedrock
  • Simple and responsive Streamlit interface
  • Download generated emails as a text file
  • Input validation and error handling

Tech Stack

Languages

  • Python

Framework

  • Streamlit

Cloud & AI

  • Amazon Bedrock
  • Amazon Nova Lite (amazon.nova-lite-v1:0)

SDK

  • boto3

Version Control

  • Git
  • GitHub

Project Structure

AI-Email-Generator/
│
├── app.py               # Streamlit user interface
├── ai.py                # Amazon Bedrock integration
├── requirements.txt     # Project dependencies
├── README.md
└── .gitignore

How It Works

  1. The user enters:

    • Purpose
    • Recipient
    • Tone
    • Key Points
  2. A prompt is dynamically generated based on the user's input.

  3. The prompt is sent to Amazon Bedrock using the Amazon Nova Lite model.

  4. The model generates a professional email.

  5. The generated email is displayed in the application and can be downloaded as a text file.


Installation

Clone the repository

git clone https://github.com/Bmdsaif005/AI-Email-Generator.git
cd AI-Email-Generator

Create a virtual environment

python -m venv .venv

Activate the virtual environment

Windows

.venv\Scripts\activate

Linux / macOS

source .venv/bin/activate

Install dependencies

pip install -r requirements.txt

AWS Configuration

Configure your AWS credentials before running the application.

aws configure

Provide:

  • AWS Access Key ID
  • AWS Secret Access Key
  • Default Region (recommended: ap-south-1)
  • Output Format (json)

Ensure your AWS account has access to Amazon Bedrock and the Amazon Nova Lite model.


Run the Application

streamlit run app.py

The application will be available in your browser at:

http://localhost:8501

Screenshots

image1 - HOME ai email generator 1

image2 - GENERATED EMAIL ai email generator 2


Future Improvements

  • Email templates for common use cases
  • Temperature and maximum word controls
  • Copy-to-clipboard functionality
  • PDF download support
  • Improved UI and layout
  • Email history using session state
  • Support for multiple AI models

Learning Outcomes

This project helped me understand:

  • Streamlit application development
  • Prompt engineering
  • Amazon Bedrock integration
  • Amazon Nova Lite
  • boto3 SDK
  • AWS authentication and configuration
  • Building AI-powered applications with Python

Author

Mohammed Saif

GitHub: https://github.com/Bmdsaif005

About

AI-powered email generator built with Python, Streamlit, and Amazon Bedrock (Amazon Nova Lite).

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages