GithubHelp home page GithubHelp logo

cyrilferte / eduaction Goto Github PK

View Code? Open in Web Editor NEW

This project forked from codehound42/eduaction

0.0 0.0 0.0 7.38 MB

EduAction is an educational content generation application powered by GenAI developed during the Encode Club AI Hackathon London 2024.

JavaScript 43.02% Python 1.04% HTML 0.11% SCSS 55.83%

eduaction's Introduction

What is EduAction?

EduAction is an educational content generation application powered by GenAI developed during the Encode Club AI Hackathon London 2024. The user submits a youtube link for a video lecture, tutorial or other instructional video, which is then transcribed and educational content including summaries, quizzes and flash cards are automatically generated. The main objective of the project is to enhance engagement for educators, students, and self-learners. By leveraging the power of artificial intelligence, EduAction aims to add to the way educational content is created and consumed, providing a more interactive and personalized learning experience.

How it works?

EduAction takes the link to a YouTube video and generates the quizzes, flashcards, summary, and topics.

Here's a high-level description of the generation process:

  1. Download YouTube video transcript from the link.
  2. Generate the video summary, and list of topics.
  3. Generate the flashcards question and the answer with prompts for image generation.
  4. Generate flashcards images using Stability.ai.
  5. Generate a quiz.
  6. Display the learning materials in the web app.

Tech Stack

High-level

The architecture is divded into two parts:

  • Backend, which uses
    • OpenAI API, and Langchain to generate the quizzes, flashcards, summary and topics.
    • Supabase file storage to store the generated materials.
    • Stability.ai API to generate images for the flashcards.
    • FastAPI for the REST API
  • Frontend, which is written in React and is responsible for the user interface and user experience.

Low-level

Backend

The is built upon OpenAI, Stability.ai, FastAPI, Supabase, and Langchain libraries. The backend folder contains the following files:

  • main.py - contains functions that post the generated materials using FastAPI wrapper and save and upload them using Supabase.

  • rag folder

    • chains.py - generates Langchain chains to generate summaries, quizzes, and flashcards.
    • data_models.py - data validation for the generated prompt.
    • prompts.py - store prompts for generating summaries, quizzes, and flashcards.
    • rag.py - store functions to generate images for the flashcards, and the text materials. Additionally, if the text is longer than 20,000 characters, we split it using the Langchain chunker so it fits into the context window and the generated materials are more specific.
  • requirements.txt - a file with all the dependencies to install.

  • setting.py - pydantic settings, set up environment variable etc.

Frontend

The website's frontend is built upon React JS, HTML and CSS. The website's pages are based upon a Bootstrap + React JS template. The pages editted in the template are EventList.js, and style.scss. The integration of the backend to frontend was particularly challenging but was solved by using nested fetch() functions (to call Open AI's API). Additionally, the process of implementing colours and styles in buttons and page layouts to fit the Figma design was fun and rewarding. A problem faced in the early mornings before the demo was a race condition error for the quiz, which was solved by redefining and rewriting functions related to quiz generation and answer handling.

Getting Started

  1. Copy the repo

    git clone https://github.com/codehound42/EduAction.git
    
  2. Backend:

    • Navigate to the backend folder.
      cd EduAction/backend
      
    • Create and activate the virtual environment in the backend folder.
      python -m venv venv
      source env/bin/activate
      
    • Install requirements.
      pip install -r requirements.txt
      
    • Rename .env.example file to .env and provide the API keys and URLs.
    • Run the application.
      • For development:
        uvicorn main:app --reload --port 8000 --log-level debug --host 0.0.0.0
      • For performance:
        gunicorn main:app --workers 4 --worker-class uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000 --timeout 1800
  3. Frontend:

    • Navigate to the frontend folder.

      cd ../frontend
      
    • Install the necessary dependencies.

      npm install
      
    • Run the app.

      npm start
      

What's next?

  • Add a social aspect of sharing the flashcards and quizzes with others.
  • Add more educational content features assignemtn generation.
    • "Fill the blanks" exercise
  • Add the recommended learning path.
  • Add option to
    • Customize the number of flashcards to generate.
    • Customize the number of quizzes to generate.
    • Customize the difficulty level.
  • Extra pages (about, contact, etc.).

eduaction's People

Contributors

codehound42 avatar ebda3is avatar maciejbalawejder avatar jeremyc53 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.