Code Monkey home page Code Monkey logo

easyflashcards's Introduction

EasyFlashcards

EasyFlashcards is an easy to use web application that creates usable flashcards from a given text. The flashcards are then provided as txt-file that you can import to your local Anki-App and you can start learning!

The project is split up into a python backend part (folder: backend) and a Next.js web interface (easy-flashcards).

Run the Project

To run the project, you need to setup the backend api and run the web app.

Backend

Go to backend/config.py and specify your api tokens:

os.environ["HUGGINGFACEHUB_API_TOKEN"] = # Your Token
os.environ["OPENAI_API_KEY"] = # Your Token

Next, open the project in a terminal and go to the backend-folder. Create a virtual environment and install all the necessary dependencies.

# create environment
python3 -m venv .env
# start environment
source .env/bin/activate
# install dependancies
pip install -r requirements.py

Now the backend is ready and you can simply run python api.py. The backend api should start on your http://localhost:5000

For a test, you can send an example request:

curl --request GET \
  --url 'http://localhost:5000/?key=5HA374PKTeDpEf7HXGNAz4qL9Vg9Ay246T4r25qY&text=A%20flashcard%20or%20flash%20card%20(also%20known%20as%20an%20index%20card)%20is%20a%20card%20bearing%20information%20on%20both%20sides%2C%20which%20is%20intended%20to%20be%20used%20as%20an%20aid%20in%20memorization.'

Frontend

Go into the directory easy-flashcards and run npm run dev

Open http://localhost:3000 with your browser to see the result.

easyflashcards's People

Contributors

timonpalm avatar

Watchers

 avatar

easyflashcards's Issues

pdf upload

Implement a new feature to upload PDFs and create flashcards from the PDF directly.

max content length

Implement the case where the input exceeds the maximum content length of the language model.
One could use the DocumentSplitter

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.