Skip to content

NLP chat bot for Centennial College with AWS service integration

Notifications You must be signed in to change notification settings

Nandusss/CentBotAWS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CentBotAWS

NLP chat bot for Centennial College with AWS service integration

Backend

How to run server in localhost:

from the directory where the CentBotAWS is cloned open the pipenv shell

cd CentBotAWS/Backend
pipenv shell

In the newly opened shell install necessary dependencies

pipenv install

after that go to Capabilies folder and run chalice local

cd Capabilities/
chalice local --no-autoreload

Test backnned using api platform

To test the endpoint use api platforms like hopscotch, insomnia, postman or CURL.

Using one of those api platform sent the json as body of the post request to localhost server. Most of the time it would be hosted at http://127.0.0.1:8000/ and the route is /chat/centbot.

TLDR: Sent the POST request request to

http://127.0.0.1:8000/chat/centbot

with body having

{
   "question"      : "Hello",
   "sourceLanguage": "en",
   "targetLanguage": "fr",
   "audioNeeded"   : true
}

and a response as following should be received

{
   "answer"        : "Bonjour ! Je suis CentBot, comment puis-je vous aider ?",
   "sourceLanguage": "en",
   "targetLanguage": "fr",
   "audioFileName" : "Celine_fr-FR_1711787452.mp3"
}

this suggests the translation worked and audio file is generated in the specified audio path. If you don't want audio then set audioNeeded as false.

NB

sourceLanguage should always be en

targetLanguage should be in the following list

{
"supportedTargetLanguageList": [
       "en",
       "es",
       "fr",
       "de",
       "it",
       "pt",
       "nl",
       "ru",
       "ja",
       "ko",
       "zh",
       "ar",
       "hi",
       "tr"
    ]
}

text cannot be empty

Frontend

How to run frontend in local host

from the directory where the CentBotAWS is cloned open Frontend/CentbotAWS directory

cd CentBotAWS/Frontend/centbot-aws

then install npm libraries

npm install

then build the files

npm run build

after that install serve (Optional if already installed)

npm install -g serve

then serve the build

serve -s build

This should run the server in localhost port 3000 by default

http://127.0.0.1:3000/home

open the link in your favorite browser

About

NLP chat bot for Centennial College with AWS service integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published