Thanks to visit codestin.com
Credit goes to github.com

Skip to content

wonderrful003/CodeAlpha_Tasks

Repository files navigation

CodeAlpha AI Internship Projects

Python Django AI License

πŸ“‚ Projects Overview

This repository contains two AI-powered applications developed during the CodeAlpha Artificial Intelligence Internship:

  1. πŸ€– AI-Powered FAQ Chatbot - Intelligent question-answering system
  2. 🌍 AI Translator - Multilingual translation web application

πŸ€– AI-Powered FAQ Chatbot

πŸš€ Project Overview

This project is an AI-powered FAQ Chatbot built for the CodeAlpha Artificial Intelligence Internship. The chatbot uses Natural Language Processing (NLP) to understand user queries and return the most relevant answers from an FAQ database.

✨ Key Features

  • πŸ€– AI Question Matching using TF-IDF and cosine similarity
  • πŸ“š 80+ preloaded FAQs across multiple categories
  • 🎯 High accuracy through advanced text preprocessing
  • πŸ“Š Confidence scoring for responses
  • ⚑ Real-time chat interface
  • πŸ”§ FAQ management dashboard
  • πŸ“± Responsive UI for all devices

πŸ› οΈ Technologies Used

  • Backend: Django 4.2
  • ML/NLP: Scikit-learn, NLTK, NumPy
  • Frontend: HTML5, CSS, JavaScript, Bootstrap
  • Database: SQLite (dev), PostgreSQL ready

🎯 AI Workflow

  1. Text cleaning & tokenization
  2. Stop-word removal
  3. Stemming (Porter)
  4. TF-IDF vectorization
  5. Cosine similarity ranking

πŸš€ Quick Start Guide

1. Clone the repo

git clone https://github.com/wonderrful003/CodeAlpha_Tasks.git
cd CodeAlpha_Tasks/Chatbot_for_FAQs

2. Create and activate virtual environment

python -m venv chatbot_env
source chatbot_env/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Run migrations

python manage.py migrate

5. Load sample FAQs

python manage.py load_comprehensive_faqs

6. Start the server

python manage.py runserver

7. Access the app

πŸ“ Project Structure

Chatbot_for_FAQs/
β”œβ”€β”€ chatbot/
β”œβ”€β”€ faq_chatbot/
└── documentation/

πŸ”§ API Endpoints

  • GET / β€” Chat UI
  • POST /api/chat/ β€” Chatbot API
  • GET /faqs/ β€” FAQ manager
  • POST /faqs/ β€” Add FAQ

🌍 AI Translator - Multilingual Translation Web Application

A fast, AI-powered multilingual translation web application built with Django and Python. Supports 25+ languages including comprehensive African language support with Chichewa, Swahili, Yoruba, and more.

Languages African Languages

πŸš€ Features

  • 🌐 25+ Languages - Comprehensive global language support
  • πŸ‡ΏπŸ‡¦ 15 African Languages - Specialized support for African languages including Chichewa, Swahili, Yoruba, Igbo, Hausa, and more
  • πŸ€– AI-Powered Translation - Uses state-of-the-art MarianMT models from HuggingFace
  • ⚑ Fast Performance - Optimized with caching and lazy loading
  • 🎨 Modern UI - Clean black and white responsive design
  • πŸ“± Real-time Translation - Instant results with loading indicators and error handling
  • πŸ”§ RESTful API - Fully functional API for integration

πŸ› οΈ Technology Stack

Backend

  • Framework: Django 4.2.7 + Django REST Framework
  • AI Models: HuggingFace Transformers, PyTorch
  • Caching: Django Cache Framework
  • Authentication: Django CSRF Protection

Frontend

  • UI Framework: Bootstrap 5.3.0
  • Icons: Font Awesome 6.0
  • JavaScript: Vanilla ES6+
  • Styling: Custom CSS with glassmorphism effects

AI/ML

  • Translation Models: Helsinki-NLP MarianMT models
  • Inference: PyTorch with GPU support (if available)
  • Tokenization: SentencePiece, Sacremoses

🌐 Supported Languages

European Languages

  • English (en), Spanish (es), French (fr), German (de)
  • Italian (it), Portuguese (pt), Russian (ru)

Asian Languages

  • Chinese (zh), Japanese (ja), Korean (ko), Arabic (ar)

African Languages

  • Swahili (sw) - East Africa
  • Yoruba (yo) - West Africa
  • Igbo (ig) - Nigeria
  • Hausa (ha) - West Africa
  • Amharic (am) - Ethiopia
  • Somali (so) - Horn of Africa
  • Zulu (zu) - South Africa
  • Xhosa (xh) - South Africa
  • Kinyarwanda (rw) - Rwanda
  • Chichewa (ny) - Malawi, Zambia, Zimbabwe
  • Malagasy (mg) - Madagascar
  • Lingala (ln) - Central Africa
  • Shona (sn) - Zimbabwe
  • Sesotho (st) - Lesotho
  • Setswana (tn) - Botswana

πŸš€ Quick Start Guide

1. Navigate to project

cd CodeAlpha_Tasks/Language_Translation_Tool

2. Create and activate virtual environment

python -m venv translator_env
source translator_env/bin/activate

3. Install dependencies

pip install -r requirements.txt

4. Set up environment variables

echo "SECRET_KEY=your-secret-key-here" > .env
echo "DEBUG=True" >> .env

5. Run database migrations

python manage.py makemigrations
python manage.py migrate

6. Start development server

python manage.py runserver

7. Access the application

Open http://127.0.0.1:8000/ in your browser

πŸ”§ API Endpoints

  • POST /api/translate/ - Translate text
  • GET /api/languages/ - Get supported languages list
  • GET /api/health/ - Health check endpoint

Example API Usage

curl -X POST http://127.0.0.1:8000/api/translate/ \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, how are you?",
    "source_lang": "en",
    "target_lang": "ny"
  }'

πŸ“ Project Structure

Language_Translation_Tool/
β”œβ”€β”€ ai_translator/
β”œβ”€β”€ translator/
β”œβ”€β”€ services/
β”œβ”€β”€ static/
└── templates/

πŸ› οΈ Installation for Both Projects

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)
  • Git

Setup Instructions

  1. Clone the repository

    git clone https://github.com/wonderrful003/CodeAlpha_Tasks.git
    cd CodeAlpha_Tasks
  2. Set up FAQ Chatbot

    cd Chatbot_for_FAQs
    python -m venv chatbot_env
    source chatbot_env/bin/activate
    pip install -r requirements.txt
    python manage.py migrate
    python manage.py load_comprehensive_faqs
    python manage.py runserver
  3. Set up AI Translator (in new terminal)

    cd Language_Translation_Tool
    python -m venv translator_env
    source translator_env/bin/activate
    pip install -r requirements.txt
    python manage.py migrate
    python manage.py runserver 8001

🌐 Access Points


πŸ‘₯ Author

Wonderful Ntepa
CodeAlpha AI Intern
LinkedIn | GitHub

πŸ“„ License

This project is licensed under the MIT License.

πŸ™ Acknowledgments


⭐ If you find these projects useful, consider starring the repository!

About

CodeAlpha_Tasks contains projects from my CodeAlpha internship, including a multilingual Language Translation Tool and an AI-powered FAQ Chatbot, showcasing practical skills in Python, NLP, and machine learning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors