This repository contains two AI-powered applications developed during the CodeAlpha Artificial Intelligence Internship:
- π€ AI-Powered FAQ Chatbot - Intelligent question-answering system
- π AI Translator - Multilingual translation web application
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.
- π€ 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
- Backend: Django 4.2
- ML/NLP: Scikit-learn, NLTK, NumPy
- Frontend: HTML5, CSS, JavaScript, Bootstrap
- Database: SQLite (dev), PostgreSQL ready
- Text cleaning & tokenization
- Stop-word removal
- Stemming (Porter)
- TF-IDF vectorization
- Cosine similarity ranking
git clone https://github.com/wonderrful003/CodeAlpha_Tasks.git
cd CodeAlpha_Tasks/Chatbot_for_FAQspython -m venv chatbot_env
source chatbot_env/bin/activatepip install -r requirements.txtpython manage.py migratepython manage.py load_comprehensive_faqspython manage.py runserver- Chat Interface β http://127.0.0.1:8000
- FAQ Management β http://127.0.0.1:8000/faqs
- Admin Panel β http://127.0.0.1:8000/admin
Chatbot_for_FAQs/
βββ chatbot/
βββ faq_chatbot/
βββ documentation/
GET /β Chat UIPOST /api/chat/β Chatbot APIGET /faqs/β FAQ managerPOST /faqs/β Add FAQ
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.
- π 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
- Framework: Django 4.2.7 + Django REST Framework
- AI Models: HuggingFace Transformers, PyTorch
- Caching: Django Cache Framework
- Authentication: Django CSRF Protection
- UI Framework: Bootstrap 5.3.0
- Icons: Font Awesome 6.0
- JavaScript: Vanilla ES6+
- Styling: Custom CSS with glassmorphism effects
- Translation Models: Helsinki-NLP MarianMT models
- Inference: PyTorch with GPU support (if available)
- Tokenization: SentencePiece, Sacremoses
- English (
en), Spanish (es), French (fr), German (de) - Italian (
it), Portuguese (pt), Russian (ru)
- Chinese (
zh), Japanese (ja), Korean (ko), Arabic (ar)
- 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
cd CodeAlpha_Tasks/Language_Translation_Toolpython -m venv translator_env
source translator_env/bin/activatepip install -r requirements.txtecho "SECRET_KEY=your-secret-key-here" > .env
echo "DEBUG=True" >> .envpython manage.py makemigrations
python manage.py migratepython manage.py runserverOpen http://127.0.0.1:8000/ in your browser
- POST
/api/translate/- Translate text - GET
/api/languages/- Get supported languages list - GET
/api/health/- Health check endpoint
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"
}'Language_Translation_Tool/
βββ ai_translator/
βββ translator/
βββ services/
βββ static/
βββ templates/
- Python 3.8 or higher
- pip (Python package manager)
- Git
-
Clone the repository
git clone https://github.com/wonderrful003/CodeAlpha_Tasks.git cd CodeAlpha_Tasks -
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
-
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
- FAQ Chatbot: http://127.0.0.1:8000
- AI Translator: http://127.0.0.1:8001
Wonderful Ntepa
CodeAlpha AI Intern
LinkedIn | GitHub
This project is licensed under the MIT License.
- HuggingFace for state-of-the-art NLP models
- Helsinki-NLP for MarianMT translation models
- Django Software Foundation for the web framework
- CodeAlpha for the internship opportunity
β If you find these projects useful, consider starring the repository!