Skip to content

varundeepakgudhe/auto_anki

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WebGPT-4 Anki Builder

forthebadge made-with-python

Flask HTML5 CSS3 JavaScript Bootstrap Docker CodeCov GHActions

Build Status DOI codecov PEP8 GitHub license GitHub issues GitHub issues-closed PRs Welcome version Test Cases Test Cases

Table of Contents
  1. Introducing WebGPT-4 Anki Builder
  2. Why should you choose WebGPT-4 Anki Builder?
  3. Quick Start
  4. Check out the video!
  5. Sucessful usecases
  6. Installation
  7. Docker Deployment for Web Application
  8. Code Documentation
  9. How to Contribute
  10. Future RoadMap
  11. Contact us(Contributors)
  12. Project's Funding
  13. Acknowledgements
  14. Recommended citation

Introducing WebGPT-4 Anki Builder – The Next-Level Learning Experience!

WebGPT-4 Anki Builder takes the innovative concept of Auto Anki with ChatGPT 4 and elevates it to new heights, introducing a dynamic web application platform. This advanced tool seamlessly turns various types of educational content, including web pages, into highly effective and precise flashcards, driven by the power of ChatGPT 4 and GPT-4's URL processing capabilities.

Designed for students, educators, and lifelong learners, WebGPT-4 Anki Builder is your go-to solution for transforming complex information into manageable study aids. Whether you're handling dense academic materials or seeking to grasp intricate concepts, our application is engineered to streamline your learning process.

Here's what WebGPT-4 Anki Builder can do for you:

The WebGPT-4 Anki Builder not only extracts crucial concepts from your lectures to generate targeted questions, ensuring a thorough grasp of the material, but also searches the web for the most relevant answers to guarantee the accuracy of your flashcards. It leverages Anki's robust features to allow users to rate the difficulty level of each question, aiding in the memorization of challenging concepts.

Building upon this, the application now enables the creation of flashcards directly from web content using GPT-4 integration, capturing the essence of diverse subject matters. It offers customizable flashcard creation, empowering users to tailor the number of flashcards to their learning needs. The responsive web design ensures a seamless user experience across various devices. With real-time status updates, learners stay informed throughout the flashcard creation process, and enhanced error reporting with informative pop-ups guides them through any issues encountered. Finally, the upgraded GPT-4 integration enhances the relevance and accuracy of the flashcards, enriching the learning experience.

Why should you choose WebGPT-4 Anki Builder?

Picture this: you're faced with an ocean of educational content, daunting and seemingly impenetrable. Then, along comes WebGPT-4 Anki Builder, a beacon of clarity in this sea of information. It's not just a study tool; it's your personal academic ally, transforming complex lecture materials into easily digestible flashcards. With the power of GPT-4, it sifts through content, pinpointing and extracting key concepts, and tailoring these into a format that makes learning not just effective, but enjoyable.

This tool is a breakthrough in adaptive learning. Whether cramming for exams, revisiting old topics, or delving into new ones, WebGPT-4 Anki Builder molds itself to fit your unique learning needs. It offers a responsive, seamless study experience across all devices, complemented by real-time updates that keep you informed of your progress. The real magic lies in its precision – enhanced error reporting and the accuracy of GPT-4 integration ensure that what you're studying is not just relevant but also meticulously curated for your success.

Dive into the world of WebGPT-4 Anki Builder, where your study sessions turn into a knowledge fiesta, and learning feels like unlocking cheat codes for your brain! πŸš€πŸ§ πŸŽ‰

Top-Level Architecture:

image

Quick Start

Step into the future with WebGPT-4 Anki Builder: Just upload your study materials or feed in a URL, and voilΓ  – your personalized APKG file is crafted in a flash! Import it into Anki and make studying not just a breeze, but a thrilling adventure. Quick, effortless, and smart – it's learning, reimagined! πŸŒŸπŸ“šπŸ’‘

After you run the application:

Tkinter GUI Web Application

  • The above two represents: 1. The updated Tkinter GUI 2. Web Application of the Auto Anki

  • How to use Tkinter GUI

    • For file upload:

      • Choose the API source from the dropdown (Google or GPT-4)
      • Enter the number of flashcards you want to generate(default: 10)
      • Click on browse files to select the file you want to process (Type: PDF or DOCX)
      • After selecting the file, it will be processed and apkg file is generated in anki-decks folder
    • For URL processing:

      • Paste the url of the website you want to generate anki cards on, in the url input field
      • Enter the number of flashcards you want to generate
      • Click on the -> button to process the url
      • Now, it will be processed and apkg file is generated in anki-decks folder
    • Take the apkg file and upload in anki software to view the ankicards

  • How to use Web Application

    • The toggle by default will be File

      • For file upload, Choose the API source from the dropdown (Google or GPT-4)
      • Enter the number of flashcards you want to generate
      • Click on Choose File to select the file you want to process (Type: PDF or DOCX)
      • After choosing the file, click on Process File
      • After the status changes from Ready to File is processed, click on Download APKG File*
      • The apkg file can be found in your downloads
    • Swithc toggle to URL for url processing

      • Enter the url of the website you want to generate anki cards on, in the url input field
      • Enter the number of flashcards you want to generate
      • Click on Process URL
      • After the status changes from Ready to File is processed, click on Download APKG File*
    • Take the apkg file and upload in anki software to view the ankicards

With the Anki application, you can open the apkg file generated and enjoy a new and enhanced studying experience.

New Features

Here's a series of pictures to demonstrate the features we've added:

1. URL Processing with GPT-4 Integration

Our latest update introduces a revolutionary URL processing feature. Now, users can create flashcards directly from any website. This enhancement is powered by the integration of GPT-4, ensuring highly accurate and relevant content extraction. This is a significant leap from the previous version, which was limited to generating flashcards only from PDF or DOCX files.

image

2. Customizable Flashcard Quantity

Flexibility is key in our new update. Users now have the option to specify the number of flashcards they wish to generate. This new feature contrasts with the earlier version's fixed flashcard output, offering a more tailored learning experience.

image

3. Responsive GUI Design

We've overhauled the user interface, transitioning from a non-responsive tkinter-based GUI to a fully responsive design. This update enhances user interaction, making the application more adaptable to various screen sizes and user needs.

image

4. Integrated Status Bar

Our new status bar provides real-time updates on the application's state. It indicates when the GUI is ready, when files are being processed, and when the processing is complete. This feature eliminates the need to manually check for file generation, streamlining the user experience.

In the screenshots, we can see the status bar shows the status of the application after the file is uploaded

    1. Processing file...
    1. File processed successfully.

Processing file... File processed successfully.

5. Improved Error Handling and Messaging

To further aid user understanding, we've implemented a message box that displays errors or confirms successful file generation. This feature provides clear, immediate feedback about the application's status and any issues encountered during file processing, a significant improvement over the previous version's lack of in-app updates.

In the below example, we removed the API KEY and tried to run the url processing:

Screenshot 2023-11-27 at 8 08 11β€―PM

6. Rewritten GPT Integration for Enhanced Accuracy

In response to the latest changes in OpenAI's API, we've completely rewritten our GPT integration, upgrading to the cutting-edge GPT-4 model. This overhaul was crucial not only for adhering to new API standards but also for significantly boosting the precision of flashcard generation. Our team re-engineered this aspect from the ground up, ensuring smooth and efficient conversion, thereby enhancing the overall functionality and user experience of our learning tool.

7. Introducing Our Ace Card: A Dynamic Web Interface ✨

Elevating our toolkit to new heights, we proudly introduce the seventh major update β€” a shift to a dynamic web application, enhancing user engagement far beyond what the previous tkinter GUI could offer. This new web interface boasts a dynamic background, a toggle button for effortless switching between file and URL processing, and a direct download option for the generated APKG files post-processing. It's a comprehensive upgrade that not only makes the application more visually appealing and interactive but also significantly enriches the user's experience with its streamlined and intuitive functionality.

image

8. Docker Integration for Seamless Cross-Platform Use 🐳

In a stride toward universal accessibility and ease of deployment, we've encapsulated the web application ui for anki builder within a Docker container. By placing the Docker image on Docker Hub, we've dramatically reduced build overhead and ensured cross-platform compatibility. Now, users from any environment can spin up WebGPT-4 Anki Builder with minimal setup, opening doors to a hassle-free, consistent flashcard creation experience across any platform. 🐳

Check out the video!

ODFYETZ44INYKVH7.mp4

Successful usecases

πŸŽ‰οΈ πŸŽ‰οΈ Case Study: Web Development Mastery

User: Matthew

Background: Aspiring Web Developer

Scenario:

  • Matthew, an aspiring web developer, found himself overwhelmed with the sheer volume of coding concepts and frameworks he needed to master.
  • He turned to WebGPT-4 Anki Builder for help, using it to generate flashcards from various online programming tutorials and documentation.
  • Matthew utilized the URL processing feature to directly create cards from web resources, making his study sessions more efficient and focused.

Result:

  • In just a few weeks, Matthew observed a remarkable improvement in his understanding of complex web development concepts.
  • He successfully built his first full-stack web application, crediting the clarity and retention provided by WebGPT-4 Anki Builder for his accelerated learning curve.

πŸŽ‰οΈ πŸŽ‰οΈ Case Study: Mastering Kubernetes and Flask

User: Varun

Background: Computer Science Major

Scenario:

  • Varun, a computer science student, was eager to learn Kubernetes and Flask to deploy his web application efficiently.
  • Facing the complexity of Kubernetes and the nuances of Flask, Varun turned to WebGPT-4 Anki Builder for a streamlined learning approach.
  • He used the tool to create flashcards from Kubernetes documentation and Flask tutorials, transforming extensive technical content into bite-sized, manageable learning segments.

Result:

  • With the help of WebGPT-4 Anki Builder, Varun quickly grasped the intricacies of container orchestration with Kubernetes and web development with Flask.
  • His newfound proficiency led to the successful deployment of his web application, showcasing a robust backend managed by Flask and scalable deployment handled by Kubernetes.

Installation

  1. Clone the repository git clone https://github.com/smarabattula/auto_anki
  2. Set up a virtual environment (Optional, but highly recommended):
    • Create the virtual environment: python -m venv myenv
    • Activate the virtual environment: source myenv/bin/activate(for MacOS) and source myenv/Scripts/activate (for Windows).
    • Note: In future runs, you won't need to create the virtual environment again, just activate it.
  3. Install all required packages: pip install -r requirements.txt
  4. Download a required model: python -m spacy download en_core_web_lg
  5. Add the Anki library as submodule in your project folder git clone https://github.com/kerrickstaley/genanki
  6. Navigate into the cloned directory and Install the Anki library: cd genanki; python setup.py install
  7. Navigate to Project folder again The command to run the project is:
    • Web Application:python3 code/ui1.py
    • Tkinter GUI : python3 code/ui.py
  8. Install the project as a Python package(Optional): pip install .
  9. Create .env file and insert API_KEY='YOUR_OPENAI_KEY_FOR_GPT-4'

Docker Deployment for Web Application

  1. Create Docker Account (https://www.docker.com/)

  2. Install Docker Dektop (https://www.docker.com/products/docker-desktop/)

  3. In Search bar at top of docker desktop application search for auto_anki

  4. Pull msills23/auto_anki image

  5. Click the run action on the image

  6. Expand the optional settings and enter 5000 for the port number

  7. Run the new container

  8. Go to containers tab and click on the square with an arrow through it to the right of the port numbers

This will open the GUI in your web browser

Code Documentation

Documentation of the entire codebase is generated using Pycco. You can find the documentation here.

If you are a developer, and want to update documentation:

  • Install Pycco pip install pycco
  • Use Pycco to generate docs. pycco auto_anki/**/*.py -p

Code Coverage

For checking code coverage,

  • Install Coverage (https://pypi.org/project/coverage/) pip install coverage
  • For generating the report run cd code python -m coverage run -m unittest discover
  • For viewing the report run python -m coverage report
Name Stmts Miss Cover
anki.py 17 1 94%
extract_sizes.py 49 16 67%
user_cli.py 34 2 94%
wordprocessing.py 125 4 97%
TOTAL 238 23 90%

How to Contribute

We would be happy to receive contributions! If you'd like to, please go through our CONTRIBUTING.md.

For any feedback, issues, or bug reports, please create an issue here.

Future RoadMap

Development of In-App Flashcard Viewer:

  • Create an interactive flashcard viewer within the web application, allowing users to review and study the flashcards directly on the site.
  • Implement features such as flipping the card for answers, progressing to the next card, and random shuffle.

Adaptive Learning Algorithms:

  • Introduce machine learning algorithms that adapt to individual user learning patterns and preferences.
  • Provide personalized recommendations and flashcard adjustments based on user performance.

Contact us(Contributors):

We are here to support you. Feel free to email us with any question or bug reports. We try our best to reply as soon as possible.

Project's funding

Our project is currently not funded, and we operate on a volunteer and open-source basis , and currently,improvement of the project solely relies on the dedication of our team and contributions from the open-source community.

Acknowledgements

We have built this code on top of the stack from the project https://github.com/tran4code/auto_anki

Recommended citation

You can cite us like this:

WebGPT-4 Anki Builder. Version 1.0. Sasank Marabattula, Varun Deepak Gudhe, MatthewSills. 2023. [https://github.com/varundeepakgudhe/auto_anki]

About

Create anki cards for all your lectures!

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 80.2%
  • CSS 7.7%
  • HTML 7.2%
  • JavaScript 4.4%
  • Dockerfile 0.5%