Skip to content

nwjbrandon/roboteacher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RoboTeacher: Learning Reading And Listening Comprehension With ChatGPT

This app targets language learners to practice reading and listening comprehension using online articles. Online articles are scraped daily. Questions, translations and voice-overs are generated from the passage with ChatGPT. Learn at RoboTeacher

Demo

Architecture

Architecture

The application runs on a serverless architecture on AWS. Lambda is triggered daily using Cloudwatch Events to scrap online articles. The article is sent to OpenAI to generate questions, translated text, and voice-overs. The audio is saved on S3 and can be publicly accessed. The generated data is saved in MongoDB. The lambda is exposed via API Gateway as a RESTful API to allow the frontend to invoke the API and fetch data. The infrastructure is configured with Terraform.

Setup

Setup Database

Setup AWS infrasturcture

  • Setup Terraform Cloud to provision resources on AWS
  • Initialise and apply changes in the deployment folder
terraform init
terraform apply

Backend

  • Install python 3.8
  • Create and update the environment variables in .env in the backend folder
pip install -r requirements.txt
python3 lambda_function.py
  • Build docker image and push to AWS Lambda
bash build.sh

Frontend

  • Install node v18 and yarn v1.22
  • Create and update the environment variables in .env in the frontend folder
yarn install
yarn start

Experiments

  • Experiments are conducted in the exp folder

Reference

TODO

  • Categorise the difficulty levels
  • Add “Buy me a coffee”
  • Support for other languages
  • Minimize cost from ChatGPT